Andreas Cadhalpun
8812d047bc
electronicarts: prevent overflow during block alignment calculation
...
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2017-01-29 01:20:52 +01:00
Andreas Cadhalpun
ad5807f8aa
avformat: fix overflows during bit rate calculation
...
The bit_rate field has type int64_t since commit
7404f3bdb9
.
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-12-14 01:06:55 +01:00
Clément Bœsch
8ef57a0d61
Merge commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb'
...
* commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb':
cosmetics: Fix spelling mistakes
Merged-by: Clément Bœsch <u@pkh.me>
2016-06-21 21:55:34 +02:00
Vittorio Giovara
41ed7ab45f
cosmetics: Fix spelling mistakes
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2016-05-04 18:16:21 +02:00
Derek Buitenhuis
6f69f7a8bf
Merge commit '9200514ad8717c63f82101dc394f4378854325bf'
...
* commit '9200514ad8717c63f82101dc394f4378854325bf':
lavf: replace AVStream.codec with AVStream.codecpar
This has been a HUGE effort from:
- Derek Buitenhuis <derek.buitenhuis@gmail.com>
- Hendrik Leppkes <h.leppkes@gmail.com>
- wm4 <nfxjfg@googlemail.com>
- Clément Bœsch <clement@stupeflix.com>
- James Almer <jamrial@gmail.com>
- Michael Niedermayer <michael@niedermayer.cc>
- Rostislav Pehlivanov <atomnuker@gmail.com>
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-04-10 20:59:55 +01:00
Anton Khirnov
9200514ad8
lavf: replace AVStream.codec with AVStream.codecpar
...
Currently, AVStream contains an embedded AVCodecContext instance, which
is used by demuxers to export stream parameters to the caller and by
muxers to receive stream parameters from the caller. It is also used
internally as the codec context that is passed to parsers.
In addition, it is also widely used by the callers as the decoding (when
demuxer) or encoding (when muxing) context, though this has been
officially discouraged since Libav 11.
There are multiple important problems with this approach:
- the fields in AVCodecContext are in general one of
* stream parameters
* codec options
* codec state
However, it's not clear which ones are which. It is consequently
unclear which fields are a demuxer allowed to set or a muxer allowed to
read. This leads to erratic behaviour depending on whether decoding or
encoding is being performed or not (and whether it uses the AVStream
embedded codec context).
- various synchronization issues arising from the fact that the same
context is used by several different APIs (muxers/demuxers,
parsers, bitstream filters and encoders/decoders) simultaneously, with
there being no clear rules for who can modify what and the different
processes being typically delayed with respect to each other.
- avformat_find_stream_info() making it necessary to support opening
and closing a single codec context multiple times, thus
complicating the semantics of freeing various allocated objects in the
codec context.
Those problems are resolved by replacing the AVStream embedded codec
context with a newly added AVCodecParameters instance, which stores only
the stream parameters exported by the demuxers or read by the muxers.
2016-02-23 17:01:58 +01:00
Hendrik Leppkes
c2f861ca42
Replace remaining occurances of av_free_packet with av_packet_unref
2015-10-27 14:35:30 +01:00
Hendrik Leppkes
7f5af80ba4
Merge commit 'ce70f28a1732c74a9cd7fec2d56178750bd6e457'
...
* commit 'ce70f28a1732c74a9cd7fec2d56178750bd6e457':
avpacket: Replace av_free_packet with av_packet_unref
Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-10-27 14:28:56 +01:00
Luca Barbato
ce70f28a17
avpacket: Replace av_free_packet with av_packet_unref
...
`av_packet_unref` matches the AVFrame ref-counted API and can be used as
a drop in replacement.
Deprecate `av_free_packet`.
2015-10-26 18:00:55 +01:00
Peter Ross
cdfc61de4e
libavformat/electronicarts: also demux mpeg audio layer 2
...
Signed-off-by: Peter Ross <pross@xvid.org>
http://wiki.multimedia.cx/index.php?title=Electronic_Arts_SCxl
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-22 12:08:05 +02:00
Paul B Mahol
6debfce6a3
avformat/electronicarts: fix demuxing of certain eam files
...
Such files have gaps between header chunks.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-10-22 11:01:00 +02:00
Paul B Mahol
0d7c027483
avformat/electronicarts: support ADPCM PSX
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-10-22 11:01:00 +02:00
Peter Ross
803bdc5469
electronicarts: demux alpha stream
...
Electronic Arts VP6 files may contain two video streams: one for the
primary video stream and another for the alpha mask. The file format
uses identical data structures for both streams.
Signed-off-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-25 12:45:09 +02:00
Peter Ross
a2517fca1e
electronicarts: move video stream properties into dedicated structure
...
This is required for the alpha stream demux patch.
Signed-off-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-25 12:45:00 +02:00
Stephan Vedder
b368428fc0
avformat/electronicarts: Fixed ea_probe function to accept vp6a videos
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-23 03:34:33 +02:00
Paul B Mahol
6dfa70f272
Correct few "ffmpeg" typos
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2014-08-24 11:05:42 +00:00
Michael Niedermayer
3e07a056a8
Merge commit 'cb7b1a2dfb547ab78342a7a9d5cd729d77d90421'
...
* commit 'cb7b1a2dfb547ab78342a7a9d5cd729d77d90421':
electronicarts: set the framerate for TGQ/TQI
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-22 21:00:06 +02:00
Michael Niedermayer
ce1059d5c9
Merge commit '7b6aae23e12f41cdfac7f1069debfe44d9a3d136'
...
* commit '7b6aae23e12f41cdfac7f1069debfe44d9a3d136':
electronicarts: read the framerate for MAD
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-22 20:50:16 +02:00
Michael Niedermayer
350dd85345
Merge commit '4d6c5152849e23a4cc0f6a6ac2880c01ebcd301b'
...
* commit '4d6c5152849e23a4cc0f6a6ac2880c01ebcd301b':
electronicarts: do not fail on zero-sized chunks
Conflicts:
libavformat/electronicarts.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-22 19:01:26 +02:00
Anton Khirnov
cb7b1a2dfb
electronicarts: set the framerate for TGQ/TQI
...
It is hardcoded to 15fps.
2014-08-22 11:15:20 +00:00
Anton Khirnov
7b6aae23e1
electronicarts: read the framerate for MAD
2014-08-22 11:15:20 +00:00
Anton Khirnov
4d6c515284
electronicarts: do not fail on zero-sized chunks
...
At least one FATE sample contains such chunks and happens to work simply
by accident (due to find_stream_info() swallowing the error).
CC: libav-stable@libav.org
2014-08-22 11:15:20 +00:00
James Almer
d34ec64a22
replace calls to url_feof() with avio_feof()
...
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-08 00:48:38 +02:00
Michael Niedermayer
28ee7757f5
Merge commit 'd92024f18fa3d69937cb2575f3a8bf973df02430'
...
* commit 'd92024f18fa3d69937cb2575f3a8bf973df02430':
lavf: more correct printf format specifiers
Conflicts:
libavformat/asfdec.c
libavformat/cafdec.c
libavformat/dxa.c
libavformat/framecrcenc.c
libavformat/hnm.c
libavformat/iff.c
libavformat/mov.c
libavformat/mxfdec.c
libavformat/rmdec.c
libavformat/rpl.c
libavformat/smacker.c
libavformat/xmv.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-11 21:05:34 +01:00
Diego Biurrun
d92024f18f
lavf: more correct printf format specifiers
2014-03-11 13:13:41 +01:00
Michael Niedermayer
55328d5f72
avformat/electronicarts: detect endianness by comparing sizes instead of using an arbitrary threshold
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-21 14:09:45 +01:00
Michael Niedermayer
587e3c3426
avformat/electronicarts: use 64bit variable for avio_tell() result
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-21 13:48:15 +01:00
Michael Niedermayer
f9b89b61f8
avformat/electronicarts: check chunksize more completely in probe()
...
Fixes probetest failure
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-11 21:31:56 +01:00
Michael Niedermayer
20769d9349
avformat/electronicarts: check chunk size.
...
Fix infinite loop
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-11 19:51:12 +01:00
Michael Niedermayer
7057cc861d
Merge commit 'a9221e39600a31ee13e736e9e47743cde23f0280'
...
* commit 'a9221e39600a31ee13e736e9e47743cde23f0280':
electronicarts: Add more sanity checking for the number of channels
Note: This check is probably unnecessary
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-29 23:52:07 +02:00
Martin Storsjö
a9221e3960
electronicarts: Add more sanity checking for the number of channels
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-29 19:58:41 +03:00
Michael Niedermayer
eeeb3c8fa3
Merge commit 'f7e616959aff8706edccdae763c24c897c449f6f'
...
* commit 'f7e616959aff8706edccdae763c24c897c449f6f':
electronicarts: Check packet sizes before reading
Conflicts:
libavformat/electronicarts.c
See: fb1ea777b3
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-23 14:27:09 +02:00
Martin Storsjö
f7e616959a
electronicarts: Check packet sizes before reading
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-22 21:02:52 +03:00
Michael Niedermayer
165e42b542
Merge commit '163a729725c6eb0081b0af41a7279f7d19aee86e'
...
* commit '163a729725c6eb0081b0af41a7279f7d19aee86e':
electronicarts: Let functions always returning the same value return void
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-16 12:25:07 +02:00
Michael Niedermayer
4195321a82
Merge commit '4908c8ef2706d98022bf27a5c5bca1fe109e7529'
...
* commit '4908c8ef2706d98022bf27a5c5bca1fe109e7529':
electronicarts: Improve some function/variable names
Conflicts:
libavformat/electronicarts.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-16 12:14:32 +02:00
Michael Niedermayer
6bba695785
Merge commit 'a90cff137b2aca89380b0acad41cd7bb05619ece'
...
* commit 'a90cff137b2aca89380b0acad41cd7bb05619ece':
electronicarts: comment wording fixes
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-16 12:08:47 +02:00
Michael Niedermayer
6a4e55a246
Merge commit '288f2ffb57ae9e9eee2748aca26da3aeb3ca6f6c'
...
* commit '288f2ffb57ae9e9eee2748aca26da3aeb3ca6f6c':
electronicarts: Remove bogus function documentation
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-16 12:07:49 +02:00
Michael Niedermayer
a87cf3689e
Merge commit '8747fce91fca6bb8e9936497f2de05c905cf43b5'
...
* commit '8747fce91fca6bb8e9936497f2de05c905cf43b5':
electronicarts: K&R formatting cosmetics
Conflicts:
libavformat/electronicarts.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-16 12:01:22 +02:00
Diego Biurrun
163a729725
electronicarts: Let functions always returning the same value return void
2013-08-15 12:24:43 +02:00
Diego Biurrun
4908c8ef27
electronicarts: Improve some function/variable names
2013-08-15 12:24:42 +02:00
Diego Biurrun
a90cff137b
electronicarts: comment wording fixes
2013-08-15 12:24:42 +02:00
Diego Biurrun
288f2ffb57
electronicarts: Remove bogus function documentation
2013-08-15 12:24:42 +02:00
Diego Biurrun
8747fce91f
electronicarts: K&R formatting cosmetics
2013-08-15 12:24:42 +02:00
Michael Niedermayer
1831274ff1
electronicarts: check timebase, fix assertion failure
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-28 01:08:46 +01:00
Paul B Mahol
a9b424879f
lavc & lavf: replace deprecated av_log* functions
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-03-15 18:10:28 +00:00
Anton Khirnov
85a5bc054c
lavf: remove disabled FF_API_R_FRAME_RATE cruft
2013-03-11 18:23:50 +01:00
Michael Niedermayer
fb1ea777b3
electronicarts: check size before reading duration out of a chunk.
...
Fixes null pointer dereference
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-17 20:43:56 +01:00
Peter Ross
6f78ba8b0b
electronic arts: support rare samples containing adpcm_ea_r1 audio
...
Fixes ticket #1549 .
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-11 12:52:02 +01:00
Peter Ross
d168fcb68f
electronicarts: use av_log_ask_for_sample
...
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-11 12:51:16 +01:00
Michael Niedermayer
7a72695c05
Merge commit '36ef5369ee9b336febc2c270f8718cec4476cb85'
...
* commit '36ef5369ee9b336febc2c270f8718cec4476cb85':
Replace all CODEC_ID_* with AV_CODEC_ID_*
lavc: add AV prefix to codec ids.
Conflicts:
doc/APIchanges
doc/examples/decoding_encoding.c
doc/examples/muxing.c
ffmpeg.c
ffprobe.c
ffserver.c
libavcodec/8svx.c
libavcodec/avcodec.h
libavcodec/dnxhd_parser.c
libavcodec/dvdsubdec.c
libavcodec/error_resilience.c
libavcodec/h263dec.c
libavcodec/libvorbisenc.c
libavcodec/mjpeg_parser.c
libavcodec/mjpegenc.c
libavcodec/mpeg12.c
libavcodec/mpeg4videodec.c
libavcodec/mpegvideo.c
libavcodec/mpegvideo_enc.c
libavcodec/pcm.c
libavcodec/r210dec.c
libavcodec/utils.c
libavcodec/v210dec.c
libavcodec/version.h
libavdevice/alsa-audio-dec.c
libavdevice/bktr.c
libavdevice/v4l2.c
libavformat/asfdec.c
libavformat/asfenc.c
libavformat/avformat.h
libavformat/avidec.c
libavformat/caf.c
libavformat/electronicarts.c
libavformat/flacdec.c
libavformat/flvdec.c
libavformat/flvenc.c
libavformat/framecrcenc.c
libavformat/img2.c
libavformat/img2dec.c
libavformat/img2enc.c
libavformat/ipmovie.c
libavformat/isom.c
libavformat/matroska.c
libavformat/matroskadec.c
libavformat/matroskaenc.c
libavformat/mov.c
libavformat/movenc.c
libavformat/mp3dec.c
libavformat/mpeg.c
libavformat/mpegts.c
libavformat/mxf.c
libavformat/mxfdec.c
libavformat/mxfenc.c
libavformat/nsvdec.c
libavformat/nut.c
libavformat/oggenc.c
libavformat/pmpdec.c
libavformat/rawdec.c
libavformat/rawenc.c
libavformat/riff.c
libavformat/sdp.c
libavformat/utils.c
libavformat/vocenc.c
libavformat/wtv.c
libavformat/xmv.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-07 22:45:46 +02:00