Commit Graph

183 Commits

Author SHA1 Message Date
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
Anton Khirnov 36ef5369ee Replace all CODEC_ID_* with AV_CODEC_ID_* 2012-08-07 16:00:24 +02:00
Clément Bœsch 16dc5f2050 Replace various inlined inverse AVRational with av_inv_q(). 2012-08-06 00:04:36 +02:00
Michael Niedermayer b5da7d4c1a Merge remote-tracking branch 'qatar/master'
* qatar/master:
  avformat: Drop pointless "format" from container long names
  swscale: bury one more piece of inline asm under HAVE_INLINE_ASM.
  wv: K&R formatting cosmetics
  configure: Add missing descriptions to help output
  h264_ps: declare array of colorspace strings on its own line.
  fate: amix: specify f32 sample format for comparison
  tiny_psnr: support 32-bit float samples
  eamad/eatgq/eatqi: call special EA IDCT directly
  eamad: remove use of MpegEncContext
  mpegvideo: remove unnecessary inclusions of faandct.h
  af_asyncts: avoid overflow in out_size with large delta values
  af_asyncts: add first_pts option

Conflicts:
	configure
	libavcodec/eamad.c
	libavcodec/h264_ps.c
	libavformat/crcenc.c
	libavformat/ffmdec.c
	libavformat/ffmenc.c
	libavformat/framecrcenc.c
	libavformat/md5enc.c
	libavformat/nutdec.c
	libavformat/rawenc.c
	libavformat/yuv4mpeg.c
	tests/tiny_psnr.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-30 23:28:31 +02:00
Diego Biurrun 6774247a9d avformat: Drop pointless "format" from container long names 2012-07-30 13:59:06 +02:00
Michael Niedermayer 7d1918affe Merge remote-tracking branch 'qatar/master'
* qatar/master:
  flvdec: remove spurious use of stream id
  lavf: deprecate r_frame_rate.
  lavf: round estimated average fps to a "standard" fps.

Conflicts:
	ffmpeg.c
	ffprobe.c
	libavformat/avformat.h
	libavformat/electronicarts.c
	libavformat/flvdec.c
	libavformat/rawdec.c
	libavformat/utils.c
	tests/ref/fate/iv8-demux

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-30 00:56:33 +02:00
Anton Khirnov aba232cfa9 lavf: deprecate r_frame_rate.
According to its description, it is supposed to be the LCM of all the
frame durations. The usability of such a thing is vanishingly small,
especially since we cannot determine it with any amount of reliability.
Therefore get rid of it after the next bump.

Replace it with the average framerate where it makes sense.

FATE results for the wtv and xmv demux tests change. In the wtv case
this is caused by the file being corrupted (or possibly badly cut) and
containing invalid timestamps. This results in lavf estimating the
framerate wrong and making up wrong frame durations.
In the xmv case the file contains pts jumps, so again the estimated
framerate is far from anything sane and lavf again makes up different
frame durations.

In some other tests lavf starts making up frame durations from different
frame.
2012-07-29 08:06:30 +02:00