Commit Graph

561 Commits

Author SHA1 Message Date
Diego Biurrun
8f8bc92365 Add missing #includes for *INT64_MAX and *INT64_C 2013-11-23 21:55:52 +01:00
Michael Niedermayer
7865759409 avformat/avidec: Dont assert the existence of an index for video streams.
Its possible in various rare cases that an index cannot be created or allocated.
Fixes assertion failure
Fixes: signal_sigabrt_7ffff7126425_7712_pokem.avi

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-22 17:02:00 +01:00
Michael Niedermayer
9cbe834dfd avformat/avidec: Skip duplicate strf chunks
Fixes Ticket3119

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-22 02:06:03 +01:00
Michael Niedermayer
7c98c834e0 avformat/avidec: also print position in print_tag()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-22 01:29:02 +01:00
Anton Khirnov
ce9bba5340 avidec: fix a memleak in the dv init code.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
2013-11-21 20:57:58 +01:00
Paul B Mahol
a807c68253 avformat: use ff_alloc_extradata()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-10-13 20:13:38 +00:00
Michael Niedermayer
5fcd0a80a2 Merge commit 'ceec6e792e4b5baaa23b220f4fd33417631f5288'
* commit 'ceec6e792e4b5baaa23b220f4fd33417631f5288':
  avi: directly resync on DV in AVI read failure

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-10 11:31:40 +02:00
Michael Niedermayer
dd0429e1de Merge commit '756547ce7f4d67a18663503e2157aebed3531703'
* commit '756547ce7f4d67a18663503e2157aebed3531703':
  avi: DV in AVI must be considered single stream

Conflicts:
	libavformat/avidec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-10 11:22:28 +02:00
Michael Niedermayer
c589c4c52d Merge commit '1cac9accbd1f9b8596122d0735e37b97a844c514'
* commit '1cac9accbd1f9b8596122d0735e37b97a844c514':
  avi: properly fail if the dv demuxer is missing

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-10 10:40:33 +02:00
Luca Barbato
ceec6e792e avi: directly resync on DV in AVI read failure
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-10-10 07:28:17 +02:00
Luca Barbato
756547ce7f avi: DV in AVI must be considered single stream
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-10-10 07:28:03 +02:00
Luca Barbato
1cac9accbd avi: properly fail if the dv demuxer is missing
CC: libav-stable@libav.org
2013-10-10 07:27:50 +02:00
Michael Niedermayer
3a3ebc7c7d Merge commit '8d07258bb6063d0780ce2d39443d6dc6d8eedc5a'
* commit '8d07258bb6063d0780ce2d39443d6dc6d8eedc5a':
  avidec: Make sure a packet is large enough before reading its data

Conflicts:
	libavformat/avidec.c

See: 028cc42a16
Note: data!=NULL implies that the allocated array is at least FF_INPUT_BUFFER_PADDING_SIZE large
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-29 22:56:15 +02:00
Martin Storsjö
8d07258bb6 avidec: Make sure a packet is large enough before reading its data
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:56:22 +03:00
Michael Niedermayer
72eddc10fa Merge commit 'd872fb0f7ff2ff0ba87f5ccf6a1a55ca2be472c9'
* commit 'd872fb0f7ff2ff0ba87f5ccf6a1a55ca2be472c9':
  lavf: Reset the entry count and allocation size variables on av_reallocp failures

Conflicts:
	libavformat/avienc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-27 12:13:41 +02:00
Martin Storsjö
d872fb0f7f lavf: Reset the entry count and allocation size variables on av_reallocp failures
When av_reallocp fails, the associated variables that keep track of
the number of elements in the array (and in some cases, the
separate number of allocated elements) need to be reset.

Not all of these might technically be needed, but it's better to
reset them if in doubt, to make sure variables don't end up
conflicting.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-26 23:14:03 +03:00
Michael Niedermayer
20dfab33f5 Merge commit '5626f994f273af80fb100d4743b963304de9e05c'
* commit '5626f994f273af80fb100d4743b963304de9e05c':
  avformat: Use av_reallocp() where suitable

Conflicts:
	libavformat/avidec.c
	libavformat/avienc.c
	libavformat/aviobuf.c
	libavformat/oggparsevorbis.c
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-19 11:01:26 +02:00
Alexandra Khirnova
5626f994f2 avformat: Use av_reallocp() where suitable
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-09-18 18:28:38 +02:00
Paul B Mahol
c051d668b5 avformat/avidec: use av_calloc() and check for allocation error
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-09-16 18:53:28 +00:00
Michael Niedermayer
8586d8dda2 avformat/avidec: fix signedness of pointer type in get_stream_idx()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-08 19:02:19 +02:00
Michael Niedermayer
227a0eb5a9 avformat/avidec: match first index and first packet size=0 handling
Fixes Ticket2861

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-31 03:08:25 +02:00
Michael Niedermayer
20be5e0a0e Merge commit '7950e519bb094897f957b9a9531cc60ba46cbc91'
* commit '7950e519bb094897f957b9a9531cc60ba46cbc91':
  Disable deprecation warnings for cases where a replacement is available

Conflicts:
	libavcodec/avpacket.c
	libavcodec/pthread.c
	libavcodec/utils.c
	libavdevice/v4l2.c
	libavfilter/avfiltergraph.c
	libavfilter/buffersrc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-03 10:08:30 +02:00
Diego Biurrun
7950e519bb Disable deprecation warnings for cases where a replacement is available 2013-08-02 19:19:02 +02:00
Michael Niedermayer
3afcddcff2 Merge commit 'c8f0b20b4a6bb6691928789d83e4b02896969848'
* commit 'c8f0b20b4a6bb6691928789d83e4b02896969848':
  avidec: Let the inner dv demuxer take care of discarding

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-28 13:15:21 +02:00
Michael Niedermayer
d781220991 Merge commit '10aa44aa675e05067845e3e55fac37642cbbdae4'
* commit '10aa44aa675e05067845e3e55fac37642cbbdae4':
  avidec: K&R formatting cosmetics

Conflicts:
	libavformat/avidec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-28 13:06:38 +02:00
Luca Barbato
c8f0b20b4a avidec: Let the inner dv demuxer take care of discarding
CC: libav-stable@libav.org
2013-07-27 16:00:11 +02:00
Luca Barbato
10aa44aa67 avidec: K&R formatting cosmetics
Signed-off-by: Diego Biurrun <diego@biurrun.de>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-27 16:00:11 +02:00
Nigel Touati-Evans
ef8cc06d6e avformat/avidec: Fix incorrect detection of badly interleaved avi
The method guess_ni_flag needs to divide timestamps in the index
by sample_size if it is set in order to compare different streams correctly.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-05 22:07:48 +02:00
Michael Niedermayer
6c593f1b67 avidec: dont randomly skip packets for offseting the index
Fixes Ticket2490

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-17 22:16:10 +02:00
Carl Eugen Hoyos
231b331718 Do not read strd chunk in avi files as H264 extradata.
Fixes ticket #2561.
2013-05-13 12:39:44 +02:00
Michael Niedermayer
a079ed63d3 avidec: Enable full parsing for potencoder mpeg1/2
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-10 16:55:06 +02:00
Michael Niedermayer
f083b4c338 Merge commit 'e0f8be6413b6a8d334d6052e610af32935c310af'
* commit 'e0f8be6413b6a8d334d6052e610af32935c310af':
  avformat: Add AVPROBE_SCORE_EXTENSION define and use where appropriate

Conflicts:
	libavformat/ac3dec.c
	libavformat/avformat.h
	libavformat/avs.c
	libavformat/m4vdec.c
	libavformat/mov.c
	libavformat/mp3dec.c
	libavformat/mpeg.c
	libavformat/mpegvideodec.c
	libavformat/psxstr.c
	libavformat/pva.c
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-05 12:31:03 +02:00
Diego Biurrun
e0f8be6413 avformat: Add AVPROBE_SCORE_EXTENSION define and use where appropriate 2013-05-04 21:43:06 +02:00
Michael Niedermayer
27b7bfc7b5 avidec: Fix demuxing of non seekable avis with multiple RIFFs
This solution uses the size of the first RIFF if its valid
to check frame size validity when the filesize could not be determined.
Feedback is welcome, other ideas and improvments as well!

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-28 17:30:42 +01:00
Michael Niedermayer
8d0da20ca6 avidec: fix duration and bitrate of truncated files
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-19 13:09:52 +01:00
Michael Niedermayer
2653e12520 Merge commit '1afddbe59e96af75f1c07605afc95615569f388f'
* commit '1afddbe59e96af75f1c07605afc95615569f388f':
  avpacket: use AVBuffer to allow refcounting the packets.

Conflicts:
	libavcodec/avpacket.c
	libavcodec/utils.c
	libavdevice/v4l2.c
	libavformat/avidec.c
	libavformat/flacdec.c
	libavformat/id3v2.c
	libavformat/matroskaenc.c
	libavformat/mux.c
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-08 19:12:03 +01:00
Anton Khirnov
1afddbe59e avpacket: use AVBuffer to allow refcounting the packets.
This will allow us to avoid copying the packets in many cases.

This breaks ABI.
2013-03-08 07:33:45 +01:00
Michael Niedermayer
82d79289db avformat: Allocate duration_error separately
This significantly reduces the memory needed per AVStream when the
array is not needed.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-23 23:15:09 +01:00
Michael Niedermayer
b4a7f4d018 Merge commit '570a4a0189946c2c983da41d37fdd67fa13266e7'
* commit '570a4a0189946c2c983da41d37fdd67fa13266e7':
  avidec: use sensible error codes instead of -1

Conflicts:
	libavformat/avidec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-22 13:38:20 +01:00
Jindrich Makovicka
570a4a0189 avidec: use sensible error codes instead of -1
Use AVERROR_INVALIDDATA on invalid inputs, and AVERROR_EOF when no more
frames are available in an interleaved AVI.

Signed-off-by: Jindrich Makovicka <makovick@gmail.com>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-01-21 16:02:40 +01:00
Michael Niedermayer
028cc42a16 read_gab2_sub: fix null pointer dereference
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-12 17:46:05 +01:00
Carl Eugen Hoyos
ccf771cd79 Correctly skip strf tag for subtitles when decoding avi.
Fixes ticket #1797.
2012-11-30 10:18:37 +01:00
Michael Niedermayer
be89693ddc avidec: try to support oddly muxed MMES stream
Fixes ticket1804

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-22 23:20:35 +01:00
Michael Niedermayer
3d48dd01fd avidec: remove unneeded null check
Fixes CID29555
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-19 21:46:39 +02:00
Michael Niedermayer
2fed05f53a avoid more "0xFF << 24" as it is considered a integer overflow in C99
missed these in my previous search and replace

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-14 03:34:16 +02:00
Heesuk Jung
e3301459f6 avidec: Use sample size in case incorrect timestamps for aac in AVI (Ticket #1755)
In some case for aac in AVI, avidec extracts wrong PTS value.
(www.ffmpeg.org/trac/ffmpeg/ticket/1755)

I found additional case(ss=4096) and add condition.

Problematic file link : https://docs.google.com/open?id=0B6r7ZfWFIypCOTdZQUtGVEdJUUE

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-12 17:57:35 +02:00
Carl Eugen Hoyos
1a104bf641 Fix broken timestamps for some mp3 in avi samples.
Mostly based on 73ad355 by Michael Niedermayer.
Fixes ticket #606.
2012-10-10 23:59:43 +02:00
Michael Niedermayer
73ad355d23 avidec: fix 10l typo
found-by: ubitux
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-10 17:06:12 +02:00
Michael Niedermayer
229e33a2b6 avidec: override sample size of 1024 for VBR AAC
Fixes Ticket1755

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-10 16:48:58 +02:00
Michael Niedermayer
31ab1575e5 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  avcodec: Convert some commented-out printf/av_log instances to av_dlog
  avcodec: Drop silly and/or broken printf debug output
  avcodec: Drop some silly commented-out av_log() invocations
  avformat: Convert some commented-out printf/av_log instances to av_dlog
  avformat: Remove non-compiling and/or silly commented-out printf/av_log statements
  Remove some silly disabled code.
  ac3dec: ensure get_buffer() gets a buffer for the correct number of channels

Conflicts:
	libavcodec/dnxhddec.c
	libavcodec/ffv1.c
	libavcodec/h264.c
	libavcodec/h264_parser.c
	libavcodec/mjpegdec.c
	libavcodec/motion_est_template.c
	libavcodec/mpegaudiodec.c
	libavcodec/mpegvideo_enc.c
	libavcodec/put_bits.h
	libavcodec/ratecontrol.c
	libavcodec/wmaenc.c
	libavdevice/timefilter.c
	libavformat/asfdec.c
	libavformat/avidec.c
	libavformat/avienc.c
	libavformat/flvenc.c
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-01 16:12:38 +02:00
Diego Biurrun
72eaba5e4f avformat: Convert some commented-out printf/av_log instances to av_dlog 2012-10-01 10:24:28 +02:00
Diego Biurrun
11d4e92ed9 avformat: Remove non-compiling and/or silly commented-out printf/av_log statements 2012-10-01 10:24:28 +02:00
Michael Niedermayer
b96dc093ea Merge remote-tracking branch 'qatar/master'
* qatar/master:
  wmalosslessdec: increase channel_coeffs/residues size
  wmalosslessdec: increase WMALL_BLOCK_MAX_BITS to 14.
  lagarith: check count before writing zeros.
  wmaprodec: check num_vec_coeffs for validity
  avidec: use actually read size instead of requested size
  avidec: return 0, not packet size from read_packet().

Conflicts:
	libavcodec/lagarith.c
	libavcodec/wmalosslessdec.c
	libavcodec/wmaprodec.c
	libavformat/avidec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-29 15:11:34 +02:00
Anton Khirnov
0af49a63c7 avidec: use actually read size instead of requested size
Fixes CVE-2012-2788
2012-09-29 09:27:59 +02:00
Anton Khirnov
eeade678f0 avidec: return 0, not packet size from read_packet(). 2012-09-29 09:27:51 +02:00
Michael Niedermayer
8d07742cb1 avidec: workaround aac with broken block align
Fixes Ticket1742

Based on patch by: Nikola Vranic <nikola.vranic@rt-rk.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-18 22:39:54 +02:00
Michael Niedermayer
108957c661 avidec/guess_ni_flag: fix harmless integer overflow
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-10 16:56:59 +02:00
Michael Niedermayer
d46c1c72e4 Merge commit 'e6153f173a49e5bfa70b0c04d2f82930533597b9'
* commit 'e6153f173a49e5bfa70b0c04d2f82930533597b9':
  avopt: Store defaults for AV_OPT_TYPE_INT in the i64 union member

Conflicts:
	libavcodec/libopenjpegdec.c
	libavcodec/libopenjpegenc.c
	libavcodec/libx264.c
	libavcodec/mpeg12enc.c
	libavcodec/options_table.h
	libavcodec/snowenc.c
	libavcodec/tiffenc.c
	libavdevice/v4l2.c
	libavdevice/x11grab.c
	libavfilter/af_amix.c
	libavfilter/af_asyncts.c
	libavfilter/af_join.c
	libavfilter/buffersrc.c
	libavfilter/src_movie.c
	libavfilter/vf_delogo.c
	libavfilter/vf_drawtext.c
	libavformat/http.c
	libavformat/img2dec.c
	libavformat/img2enc.c
	libavformat/movenc.c
	libavformat/mpegenc.c
	libavformat/mpegtsenc.c
	libavformat/options_table.h
	libavformat/segment.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-05 14:33:32 +02:00
Piotr Bandurski
08277a45c3 lavf: add missing new line to some error messages
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-01 15:59:30 +02:00
Michael Niedermayer
ba2cf854d0 lavc: move AVRn to a seperate decoder.
The special cases in demuxers and decoders are a mess otherwise (and more
would be needed to support it fully)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-20 02:46:09 +02: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
Michael Niedermayer
8993c25695 avidec: fix AVStream.info memleak with dv.
Fixes Ticket1334

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-07 19:18:53 +02:00
Anton Khirnov
36ef5369ee Replace all CODEC_ID_* with AV_CODEC_ID_* 2012-08-07 16:00:24 +02:00
Michael Niedermayer
a80ce390df avidec: parse INFO tags at the end
Fixes Ticket1123

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-06 21:36:42 +02:00
Michael Niedermayer
d1dad7c824 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  mpc8: return more meaningful error codes.
  mpc: return more meaningful error codes.
  wv,mpc8: don't return apetag data in packets.
  rtmp: do not warn about receiving metadata packets
  x86: h264dsp: Adjust YASM #ifdefs
  x86: yadif: Mark mmxext optimizations as such
  h264: convert loop filter strength dsp function to yasm.
  Improve descriptiveness of a number of codec and container long names

Conflicts:
	libavcodec/flvdec.c
	libavcodec/libopenjpegdec.c
	libavformat/apetag.c
	libavformat/mp3dec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-31 22:41:00 +02:00
Diego Biurrun
0177b7d23a Improve descriptiveness of a number of codec and container long names 2012-07-30 20:46:55 +02:00
Michael Niedermayer
83d6ad3616 avidec: Mark first frame as keyframe in case there are no keyframes.
This fixes seeking in filecopy.avi of Ticket504

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-19 18:44:46 +02:00
Michael Niedermayer
e3c2d83183 avidec: switch to av_assert
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-11 23:26:55 +02:00
Paul B Mahol
6b9446e932 avidec: add .category
While here make .class_name consistent with other AVClass.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-06-19 16:26:01 +00:00
Paul B Mahol
7238ed6c84 avidec: use designated initializers for AVClass
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-06-19 13:59:17 +00:00
Michael Niedermayer
944d049eaa Merge remote-tracking branch 'qatar/master'
* qatar/master:
  movenc: Write chan atom for all audio tracks in mov mode movies.
  mpegtsenc: use avio_open_dyn_buf(), zero pointers after freeing
  doc/avconv: add some details about the transcoding process.
  avidec: make scale and rate unsigned.
  avconv: check output stream recording time before each frame returned from filters
  avconv: split selecting input file out of transcode().
  avconv: split checking for active outputs out of transcode().
  avfiltergraph: make some functions static.

Conflicts:
	ffmpeg.c
	libavfilter/avfiltergraph.c
	libavfilter/internal.h
	libavformat/mpegtsenc.c
	tests/ref/fate/acodec-alac
	tests/ref/fate/acodec-pcm-s16be
	tests/ref/fate/acodec-pcm-s24be
	tests/ref/fate/acodec-pcm-s32be
	tests/ref/fate/acodec-pcm-s8
	tests/ref/lavf/mov

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-04 22:59:32 +02:00
Anton Khirnov
a982e5a031 avidec: make scale and rate unsigned.
The specs say they are unsigned 32bit integers.
2012-06-04 14:18:49 +02:00
Michael Niedermayer
57778f61d0 avidec: fix odd extradata size case.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-31 00:46:47 +02:00
Michael Niedermayer
76853a3e0c libavformat: ff_get_bmp_header: return esize too
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-31 00:46:02 +02:00
Michael Niedermayer
d0f78e77e1 avidec: simplify avi_read_idx1()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-23 19:49:25 +02:00
Michael Niedermayer
212f129fb8 avidec: discard 0 packets even for sample_size==0 NI
Fixes Ticket1332

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-23 19:04:23 +02:00
Michael Niedermayer
455fcf29b8 avidec: zero extradata padding
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-19 22:52:34 +02:00
Michael Niedermayer
096231d497 avidec: Dont crash on avi packets that belong to dv streams in dv in avi
Fixes null pointer dereference

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-17 17:58:19 +02:00
Michael Niedermayer
9789b6ca48 avidec: document early_exit argument
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-17 17:58:19 +02:00
Reimar Döffinger
d05625bd04 avidec: handle 0-size packets that exist only in index.
0-sized packets are used to implement variable fps.
However there seems to be a variation where these are not
even stored in the main file but as 0-size index entries
only.
This fixes the sample in trac issue #957, it now plays both
the same ways as in MPlayer and in a way that looks correct.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-04-14 18:21:19 +02:00
Michael Niedermayer
c41ac87047 avidec: update size when packet is shrunk
Fixes out of array read

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-14 00:24:38 +02:00
Michael Niedermayer
8df774be88 avidec: better NI detection.
The new code detects NI avis by analyzing the index.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-01 10:33:16 +02:00
Michael Niedermayer
0ebd83617f Merge remote-tracking branch 'qatar/master'
* qatar/master: (27 commits)
  avconv: free packet in write_frame() when discarding due to frame number limit
  FATE: use +/- flag option syntax for vp8 emu-edge tests
  lavf: make av_interleave_packet_per_dts() private.
  lavf: deprecate av_read_packet().
  oggdec: output correct timestamps for Vorbis
  avconv: pass input stream timestamps to audio encoders
  lavc: shrink encoded audio packet size after encoding.
  xa: set correct bit rate
  xa: do not set bit_rate, block_align, or bits_per_coded_sample
  xa: fix end-of-file handling
  xa: fix timestamp calculation
  bink: fix typo in FFALIGN() argument
  bink: align plane width to 8 when calculating bundle sizes
  doc: pass -Idoc texi2html and texi2pod
  doc: texi2pod: add -I flag
  movenc: Add a min_frag_duration option
  rtsp: Set the default delay to 0.1 s for the RTSP/SDP/RTP demuxers
  libavformat: Set the default for the max_delay option to -1
  Generate manpages for AV{Format,Codec}Context AVOptions.
  doc/avconv: remove entries for AVOptions.
  ...

Conflicts:
	doc/Makefile
	doc/ffmpeg.texi
	doc/muxers.texi
	ffmpeg.c
	libavcodec/Makefile
	libavcodec/options.c
	libavcodec/vp8.c
	libavformat/options.c
	tests/fate/demux.mak
	tests/ref/fate/truemotion1-15
	tests/ref/fate/truemotion1-24

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-21 01:33:53 +01:00
Anton Khirnov
3c90cc2ef2 lavf: deprecate av_read_packet().
The caller can achieve the same effect (i.e. getting raw unparsed/mangled
packets) with av_read_frame() and AVFMT_FLAG_NOPARSE |
AVFMT_FLAG_NOFILLIN
2012-03-20 20:12:16 +01:00
Michael Niedermayer
e6380afa6a avidec: Reduce log level for out of index error message.
Its otherwise spaming every time one tries to seek to outside
the file.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-21 23:55:47 +01:00
Michael Niedermayer
c36010c286 avidec: remove harmless duplicate code.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-18 03:42:10 +01:00
Michael Niedermayer
6cb2085278 Merge remote-tracking branch 'qatar/master'
* qatar/master: (27 commits)
  ppc: Add ff_ prefix to nonstatic symbols
  sh4: Add ff_ prefix to nonstatic symbols
  mpegvideo: Add ff_ prefix to nonstatic functions
  rtjpeg: Add ff_ prefix to nonstatic symbols
  rv: Add ff_ prefix to nonstatic symbols
  vp56: Add ff_ prefix to nonstatic symbols
  vorbis: Add ff_ prefix to nonstatic symbols
  msmpeg4: Add ff_ prefix to nonstatic symbols
  vc1: Add ff_ prefix to nonstatic symbols
  msmpeg4: Add ff_ prefixes to nonstatic symbols
  snow: Add ff_ prefix to nonstatic symbols
  mpeg12: Add ff_ prefix to nonstatic symbols
  mpeg4: Add ff_ prefixes to nonstatic symbols
  lagarith: Add ff_ prefix to lag_rac_init
  libavcodec: Add ff_ prefix to j_rev_dct*
  dsputil: Add ff_ prefix to inv_zigzag_direct16
  libavcodec: Prefix fdct_ifast, fdct_ifast248
  dsputil: Add ff_ prefix to the dsputil*_init* functions
  libavcodec: Add ff_ prefix to some nonstatic symbols
  vlc/rl: Add ff_ prefix to the nonstatic symbols
  ...

Conflicts:
	libavcodec/Makefile
	libavcodec/allcodecs.c
	libavcodec/dnxhddec.c
	libavcodec/ffv1.c
	libavcodec/h263.h
	libavcodec/h263dec.c
	libavcodec/h264.c
	libavcodec/mpegvideo.c
	libavcodec/mpegvideo_enc.c
	libavcodec/nuv.c
	libavcodec/ppc/dsputil_ppc.c
	libavcodec/proresdsp.c
	libavcodec/svq3.c
	libavcodec/version.h
	libavformat/dv.h
	libavformat/dvenc.c
	libavformat/matroskadec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-16 01:34:37 +01:00
Martin Storsjö
167f3b8de7 libavformat: Add an ff_ prefix to some lavf internal symbols
Prefix the functions/tables brktimegm, pcm_read_seek,
dv_offset_reset, voc_get_packet, codec_movaudio_tags,
codec_movvideo_tags.

After this, lavf has no global symbols without the proper prefix.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-15 22:06:17 +02:00
Michael Niedermayer
b8c1655882 avidec: print informative error messages if seeking fails.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-31 00:20:52 +01:00
Michael Niedermayer
e37f161e66 Merge remote-tracking branch 'qatar/master'
* qatar/master: (71 commits)
  movenc: Allow writing to a non-seekable output if using empty moov
  movenc: Support adding isml (smooth streaming live) metadata
  libavcodec: Don't crash in avcodec_encode_audio if time_base isn't set
  sunrast: Document the different Sun Raster file format types.
  sunrast: Add a check for experimental type.
  libspeexenc: use AVSampleFormat instead of deprecated/removed SampleFormat
  lavf: remove disabled FF_API_SET_PTS_INFO cruft
  lavf: remove disabled FF_API_OLD_INTERRUPT_CB cruft
  lavf: remove disabled FF_API_REORDER_PRIVATE cruft
  lavf: remove disabled FF_API_SEEK_PUBLIC cruft
  lavf: remove disabled FF_API_STREAM_COPY cruft
  lavf: remove disabled FF_API_PRELOAD cruft
  lavf: remove disabled FF_API_NEW_STREAM cruft
  lavf: remove disabled FF_API_RTSP_URL_OPTIONS cruft
  lavf: remove disabled FF_API_MUXRATE cruft
  lavf: remove disabled FF_API_FILESIZE cruft
  lavf: remove disabled FF_API_TIMESTAMP cruft
  lavf: remove disabled FF_API_LOOP_OUTPUT cruft
  lavf: remove disabled FF_API_LOOP_INPUT cruft
  lavf: remove disabled FF_API_AVSTREAM_QUALITY cruft
  ...

Conflicts:
	doc/APIchanges
	libavcodec/8bps.c
	libavcodec/avcodec.h
	libavcodec/libx264.c
	libavcodec/mjpegbdec.c
	libavcodec/options.c
	libavcodec/sunrast.c
	libavcodec/utils.c
	libavcodec/version.h
	libavcodec/x86/h264_deblock.asm
	libavdevice/libdc1394.c
	libavdevice/v4l2.c
	libavformat/avformat.h
	libavformat/avio.c
	libavformat/avio.h
	libavformat/aviobuf.c
	libavformat/dv.c
	libavformat/mov.c
	libavformat/utils.c
	libavformat/version.h
	libavformat/wtv.c
	libavutil/Makefile
	libavutil/file.c
	libswscale/x86/input.asm
	libswscale/x86/swscale_mmx.c
	libswscale/x86/swscale_template.c
	tests/ref/lavf/ffm

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-28 07:53:34 +01:00
Anton Khirnov
6e9651d106 lavf: remove AVFormatParameters from AVFormatContext.read_header signature 2012-01-27 10:51:57 +01:00
Michael Niedermayer
28d634711b avidec: Fix regression with chunks that are larger than the file.
This commit makes the check specific to the case that needs it.

Regression was introduced by
commit 62adc60b97
Author: Michael Niedermayer <michaelni@gmx.at>
Date:   Fri Dec 16 06:13:04 2011 +0100

    avidec: Check that the header chunks fit in the available filesize.
    Fixes Ticket771
    Bug found by: Diana Elena Muscalu

    Signed-off-by: Michael Niedermayer <michaelni@gmx.at>

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-25 06:48:30 +01:00
Michael Niedermayer
14d94a1952 avidec: Fix use of stream_index before validation of its range.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-23 19:47:49 +01:00
Michael Niedermayer
4f11bed7a1 avidec: fix "avidec.c:362: warning: st may be used uninitialized in this function"
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-22 06:57:16 +01:00
Michael Niedermayer
8f0768cc22 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  Add a tool that uses avio to read and write, doing a plain copy of data
  ARM: fix build with FFT enabled and MDCT disabled
  lavf: force single-threaded decoding in avformat_find_stream_info
  avidec: migrate last of lavf from FF_ER_* to AV_EF_*
  avserver: fix build after the next bump.

Conflicts:
	libavformat/Makefile
	libavformat/avidec.c
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-21 01:33:31 +01:00
Dustin Brody
b89f8774f2 avidec: migrate last of lavf from FF_ER_* to AV_EF_*
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-01-20 09:30:09 +01:00
Michael Niedermayer
b26f0ee39f avidec: XMPG support
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-14 19:25:08 +01:00
Oana Stratulat
a63a86fd6f Fixes issue 890: OOM with zmbv file
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-14 07:19:27 +01:00
Carl Eugen Hoyos
64cafe340b Make the avi palette opaque. 2011-12-24 03:41:50 +01:00
Michael Niedermayer
3c7f75bd84 avidec: move eof check before continue.
Fixes a infinite loop
Fixes half of Ticket800
Bug found by Oana Stratulat

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-20 16:52:42 +01:00
Michael Niedermayer
62adc60b97 avidec: Check that the header chunks fit in the available filesize.
Fixes Ticket771
Bug found by: Diana Elena Muscalu

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-16 06:13:04 +01:00
Michael Niedermayer
e098fba5d9 avidec: Fix infinite loop caused by rounding of timestamps in non interleaved avis.
Fixes Ticket775
Bug found by: Diana Elena Muscalu

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-16 05:13:58 +01:00
Michael Niedermayer
8bc7fe4daf Merge remote-tracking branch 'qatar/master'
* qatar/master:
  doxygen: misc consistency, spelling and wording fixes
  vcr1: drop unnecessary emms_c() calls without MMX code
  Replace all uses of av_close_input_file() with avformat_close_input().
  lavf: add avformat_close_input().
  lavf: deprecate av_close_input_stream().
  lavf doxy: add some basic demuxing documentation.
  lavf doxy: add some general lavf information.
  lavf doxy: add misc utility functions to a group.
  lavf doxy: add av_guess_codec/format to the encoding group.
  lavf doxy: add core functions to a doxy group.
  Add basic libavdevice documentation.
  lavc: convert error_recognition to err_recognition.
  avconv: update -map option help text
  x86: Require 7 registers for the cabac asm
  x86: bswap: remove test for bswap instruction
  bswap: make generic implementation more compiler-friendly
  h264: remove useless cast
  proresdec: fix decode_slice() prototype

Conflicts:
	configure
	doc/APIchanges
	ffprobe.c
	libavcodec/avcodec.h
	libavcodec/celp_math.h
	libavcodec/h264.c
	libavfilter/src_movie.c
	libavformat/anm.c
	libavformat/avformat.h
	libavformat/version.h
	libavutil/avstring.h
	libavutil/bswap.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-13 00:39:48 +01:00
Anton Khirnov
cd3716b9aa Replace all uses of av_close_input_file() with avformat_close_input(). 2011-12-12 20:34:38 +01:00
Michael Niedermayer
9d76cf0b18 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  rtpdec: Templatize the code for different g726 bitrate variants
  rv40: move loop filter to rv34dsp context
  lavf: make av_set_pts_info private.
  rtpdec: Add support for G726 audio
  rtpdec: Add an init function that can do custom codec context initialization
  avconv: make copy_tb on by default.
  matroskadec: don't set codec timebase.
  rmdec: don't set codec timebase.
  avconv: compute next_pts from input packet duration when possible.
  lavf: estimate frame duration from r_frame_rate.
  avconv: update InputStream.pts in the streamcopy case.

Conflicts:
	avconv.c
	libavdevice/alsa-audio-dec.c
	libavdevice/bktr.c
	libavdevice/fbdev.c
	libavdevice/libdc1394.c
	libavdevice/oss_audio.c
	libavdevice/v4l.c
	libavdevice/v4l2.c
	libavdevice/vfwcap.c
	libavdevice/x11grab.c
	libavformat/au.c
	libavformat/eacdata.c
	libavformat/flvdec.c
	libavformat/mpegts.c
	libavformat/mxfenc.c
	libavformat/rtpdec_g726.c
	libavformat/wtv.c
	libavformat/xmv.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-01 02:54:24 +01:00
Anton Khirnov
c3f9ebf743 lavf: make av_set_pts_info private.
It's supposed to be called only from (de)muxers.
2011-11-30 20:34:45 +01:00
Michael Niedermayer
1e19927f12 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  vc1: use an enum for Frame Coding Mode
  doc: cleanup filter section
  indeo3: error out if no motion vector is set.
  x86inc: Flag shufps as an floating-point instruction for the AVX emulation code.
  mpegaudio: do not use init_static_data() for initializing tables.
  musepack: fix signed shift overflow in mpc_read_packet()
  mov: Make format string match variable type.
  wmavoice: Make format string match variable type.
  vc1: select interlaced scan table by FCM element
  Generalize RIFF INFO tag support; support reading INFO tag in wav
  pthread: track thread existence in a separate variable.

Conflicts:
	doc/filters.texi
	libavcodec/pthread.c
	libavformat/avi.c
	libavformat/riff.c
	libavformat/riff.h
	libavformat/wav.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-28 01:07:11 +01:00
Victor Vasiliev
12bc20502a Generalize RIFF INFO tag support; support reading INFO tag in wav
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-11-26 17:14:13 -08:00
Reimar Döffinger
bb3244dee2 Replace all usage of strcasecmp/strncasecmp
All current usages of it are incompatible with localization.
For example strcasecmp("i", "I") != 0 is possible, but would
break many of the places where it is used.

Instead use our own implementations that always treat the data
as ASCII.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-06 11:52:57 +02:00
Reimar Döffinger
96949dafcc Replace all strcasecmp/strncasecmp usages.
All current usages of it are incompatible with localization.
For example strcasecmp("i", "I") != 0 is possible, but would
break many of the places where it is used.
Instead use our own implementations that always treat the data
as ASCII.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2011-11-03 19:25:26 +01:00
Michael Niedermayer
742d218bf1 avidec: Return correct error code from avi_sync() in case of IO error.
Found-by: Tanami, Ohad
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-26 23:37:37 +02:00
Michael Niedermayer
dd8ffc1925 Merge remote-tracking branch 'qatar/master'
* qatar/master: (47 commits)
  lavc: hide private symbols.
  lavc: deprecate img_get_alpha_info().
  lavc: use avpriv_ prefix for ff_toupper4.
  lavc: use avpriv_ prefix for ff_copy_bits and align_put_bits.
  lavc: use avpriv_ prefix for ff_ac3_parse_header.
  lavc: use avpriv_ prefix for ff_frame_rate_tab.
  lavc: rename ff_find_start_code to avpriv_mpv_find_start_code
  lavc: use avpriv_ prefix for ff_split_xiph_headers.
  lavc: use avpriv_ prefix for ff_dirac_parse_sequence_header.
  lavc: use avpriv_ prefix for some dv symbols used in lavf.
  lavc: use avpriv_ prefix for some flac symbols used in lavf.
  lavc: use avpriv_ prefix for some mpeg4audio symbols used in lavf.
  lavc: use avpriv_ prefix for some mpegaudio symbols used in lavf.
  lavc: use avpriv_ prefix for ff_aac_parse_header().
  lavf: hide private symbols.
  lavf: use avpriv_ prefix for some dv functions.
  lavf: use avpriv_ prefix for ff_new_chapter().
  avcodec: add CODEC_CAP_DELAY note to avcodec_decode_audio3() documentation
  avcodec: clarify the CODEC_CAP_DELAY note in avcodec_decode_video2()
  avcodec: clarify documentation of CODEC_CAP_DELAY
  ...

Conflicts:
	configure
	doc/general.texi
	libavcodec/Makefile
	libavcodec/aacdec.c
	libavcodec/allcodecs.c
	libavcodec/avcodec.h
	libavcodec/dv.c
	libavcodec/dvdata.c
	libavcodec/dvdata.h
	libavcodec/libspeexenc.c
	libavcodec/mpegvideo.c
	libavcodec/version.h
	libavformat/avidec.c
	libavformat/dv.c
	libavformat/dv.h
	libavformat/flvenc.c
	libavformat/mov.c
	libavformat/mp3enc.c
	libavformat/oggparsespeex.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-21 02:01:26 +02:00
Anton Khirnov
ab88b25f99 lavf: use avpriv_ prefix for some dv functions.
They are used in libavdevice.
2011-10-20 20:57:23 +02:00
Michael Niedermayer
d0492578c8 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  presets: rename presets directory
  lavc: make avcodec_get_context_defaults3 "officially" public
  lavf: replace av_new_stream->avformat_new_stream part II.
  lavf,lavd: replace av_new_stream->avformat_new_stream part I.
  lavf: add avformat_new_stream as a replacement for av_new_stream.
  Use correct scaling table for bwd-pred MVs in second B-field
  Ut Video decoder
  Makefile: change presets extension to .avpreset
  lavfi: add rgbtestsrc source, ported from MPlayer libmpcodecs
  lavfi: add testsrc source
  AVOptions: add documentation.
  presets: update libx264 ffpresets

Conflicts:
	Changelog
	doc/APIchanges
	doc/ffmpeg.texi
	ffpresets/libx264-ipod320.ffpreset
	ffpresets/libx264-ipod640.ffpreset
	ffserver.c
	libavcodec/avcodec.h
	libavcodec/options.c
	libavcodec/version.h
	libavdevice/libdc1394.c
	libavfilter/avfilter.h
	libavfilter/vsrc_testsrc.c
	libavformat/flvdec.c
	libavformat/riff.c
	libavformat/version.h
	libavformat/wtv.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-20 02:34:51 +02:00
Anton Khirnov
84ad31ff18 lavf: replace av_new_stream->avformat_new_stream part II.
Manual replacements are done in this commit.

In many cases, the id is some constant made up number (e.g. 0 for video
and 1 for audio), which is then not used in the demuxer for anything.
Those ids are removed.
2011-10-19 17:02:11 +02:00
Michael Niedermayer
c4e02d3432 avidec: Dont switch to NI mode if there is no index.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-18 03:34:57 +02:00
Carl Eugen Hoyos
39f6733f05 Do not try to parse empty strf tags. 2011-10-18 03:30:03 +02:00
Clément Bœsch
539399d4d1 AVOptions: rename remaining FF_OPT_TYPE_* to AV_OPT_TYPE_*. 2011-10-17 07:33:10 +02:00
Michael Niedermayer
41f55277fa Merge remote-tracking branch 'qatar/master'
* qatar/master: (34 commits)
  h264: reset h->ref_count in case of errors in ff_h264_decode_ref_pic_list_reordering()
  error_resilience: fix the check for missing references in ff_er_frame_end() for H264
  4xm: prevent NULL dereference with invalid huffman table
  4xmdemux: prevent use of uninitialized memory
  4xm: clear FF_INPUT_BUFFER_PADDING_SIZE bytes in temporary buffers
  ptx: check for out of bound reads
  tiffdec: fix out of bound reads/writes
  eacmv: check for out of bound reads
  eacmv: fix potential pointer arithmetic overflows
  adpcm: fix out of bound reads due to integer overflow
  anm: prevent infinite loop
  avsdemux: check for out of bound writes
  avs: check for out of bound reads
  avsdemux: check for corrupted data
  AVOptions: refactor set_number/write_number
  AVOptions: cosmetics, rename static av_set_number2() to write_number().
  AVOptions: cosmetics, move and rename static av_set_number().
  AVOptions: split av_set_string3 into opt type-specific functions
  avidec: fix signed overflow in avi_sync()
  mxfdec: Fix some buffer overreads caused by the misuse of AVPacket related functions.
  ...

Conflicts:
	Changelog
	configure
	libavcodec/ptx.c
	libavcodec/ra144.c
	libavcodec/vaapi_vc1.c
	libavcodec/vc1.c
	libavcodec/version.h
	libavformat/4xm.c
	libavformat/avidec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-11 03:42:43 +02:00
Mans Rullgard
1703013cb7 avidec: fix signed overflow in avi_sync()
Keeping byte values read from the file as unsigned is consistent
with how they are subsequently used and avoids an undefined left
shift by 24 when bit 7 is set.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-10-10 17:49:13 +01:00
Janne Grunau
2886f6759f avidec: simplify size parameter in memset() 2011-10-10 13:28:18 +02:00
Nicolas George
71e23d39a3 avidec: Replace av_realloc by av_realloc_f when relevant.
Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-28 18:13:52 +02:00
Joakim Plate
f9e083a156 avidec: Check return value of more avio_seek calls
The move of avio_seek in avi_read_seek is to avoiding modifying
state if the seek would fail.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-12 04:39:12 +02:00
Joakim Plate
53f8f0a70e Fix for some non interleaved avi files that gets played twice or won't end
This changes so we assume EOF when we can't find the next
streams index entry for non interleaved file.

http://trac.xbmc.org/ticket/5585

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-11 18:21:07 +02:00
Joakim Plate
e42a3dd123 Allow reading of growing avi files (ie currently being written)
This uses the RIFF header stored size to figure out the expected AVI file size, instead
of the actual file. To work fully it requires handling failed avio_seek() instead
of assuming they always succeed.

Some fate file has been cut off and contains half a frame at the end which previously
was not output during demuxing. This frame is now output to encoder, thus fate
diff update.
2011-09-11 17:44:20 +02:00
Michael Niedermayer
0cb233cf46 Merge commit 'b2c087871dafc7d030b2d48457ddff597dfd4925'
* commit 'b2c087871dafc7d030b2d48457ddff597dfd4925':
  Move x86util.asm from libavcodec/ to libavutil/.
  Move x86inc.asm to libavutil/.
  APIchanges: note error_recognition in lavf
  lavf: add support for error_recognition, use it in avidec, and bump minor API version
  avconv: change semantics of -map
  avconv: get rid of new* options.
  cmdutils: allow precisely specifying a stream for AVOptions.
  configure: add missing CFLAGS to fix building on the HURD
  libx264: Include hint for possible values for configuring libx264
  cmdutils: allow ':'-separated modifiers in option names.
  avconv: make -map_metadata work consistently with the other options
  avconv: remove deprecated options.
  avconv: make -map_chapters accept only the input file index.
  Make a copy of ffmpeg under a new name -- avconv.
  ffmpeg: add a warning stating that the program is deprecated.
  Add weighted motion compensation for RV40 B-frames
  RV3/4: calculate B-frame motion weights once per frame
  Move RV3/4-specific DSP functions into their own context
  mjpeg: propagate decode errors from ff_mjpeg_decode_sos and ff_mjpeg_decode_dqt
  h264: notice memory allocation failure

Conflicts:
	.gitignore
	Makefile
	cmdutils.c
	configure
	doc/ffplay.texi
	doc/ffprobe.texi
	doc/ffserver.texi
	libavcodec/libx264.c
	libavformat/avformat.h
	libavformat/avidec.c
	libavformat/version.h
	tests/lavf-regression.sh
	tests/lavfi-regression.sh

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-08-13 02:56:08 +02:00
Dustin Brody
2f63440c59 lavf: add support for error_recognition, use it in avidec, and bump minor API version
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-08-12 19:10:22 +02:00
Clément Bœsch
df2039f573 avidec: add missing initializer braces to shut up gcc warning.
This fixes the warning:
    libavformat/avidec.c:81:5: warning: missing braces around initializer [-Wmissing-braces]
2011-08-10 21:02:32 +02:00
Michael Niedermayer
72b0c9f55f avidec: skip seek pos adjustment for non interleaved files.
Fixes Ticket327

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-08-04 01:33:40 +02:00
Michael Niedermayer
46eaaad8dd Detect NI-avi at playtime like mplayer.
Fixes Ticket333

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-08-03 19:02:33 +02:00
Michael Niedermayer
652c772981 avidec: Fix XAN DPCM demuxing.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-08-03 19:02:33 +02:00
Michael Niedermayer
78accb876c Merge remote-tracking branch 'qatar/master'
* qatar/master:
  ffmpeg: fix some indentation
  ffmpeg: fix operation with --disable-avfilter
  simple_idct: remove disabled code
  motion_est: remove disabled code
  vc1: remove disabled code
  fate: separate lavf-mxf_d10 test from lavf-mxf
  cabac: Move code only used in the cabac test program to cabac.c.
  ffplay: warn that -pix_fmt is no longer working, suggest alternative
  ffplay: warn that -s is no longer working, suggest alternative
  lavf: rename enc variable in utils.c:has_codec_parameters()
  lavf: use designated initialisers for all (de)muxers.
  wav: remove a use of deprecated AV_METADATA_ macro
  rmdec: remove useless ap parameter from rm_read_header_old()
  dct-test: remove write-only variable
  des: fix #if conditional around P_shuffle
  Use LOCAL_ALIGNED in ff_check_alignment()

Conflicts:
	ffmpeg.c
	libavformat/avidec.c
	libavformat/matroskaenc.c
	libavformat/mp3enc.c
	libavformat/oggenc.c
	libavformat/utils.c
	tests/ref/lavf/mxf

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-07-17 20:12:02 +02:00
Anton Khirnov
dfc2c4d900 lavf: use designated initialisers for all (de)muxers.
It's more readable and less prone to breakage.
2011-07-17 06:58:37 +02:00
Michael Niedermayer
976a8b2179 Merge remote-tracking branch 'qatar/master'
* qatar/master: (40 commits)
  H.264: template left MB handling
  H.264: faster fill_decode_caches
  H.264: faster write_back_*
  H.264: faster fill_filter_caches
  H.264: make filter_mb_fast support the case of unavailable top mb
  Do not include log.h in avutil.h
  Do not include pixfmt.h in avutil.h
  Do not include rational.h in avutil.h
  Do not include mathematics.h in avutil.h
  Do not include intfloat_readwrite.h in avutil.h
  Remove return statements following infinite loops without break
  RTSP: Doxygen comment cleanup
  doxygen: Escape '\' in Doxygen documentation.
  md5: cosmetics
  md5: use AV_WL32 to write result
  md5: add fate test
  md5: include correct headers
  md5: fix test program
  doxygen: Drop array size declarations from Doxygen parameter names.
  doxygen: Fix parameter names to match the function prototypes.
  ...

Conflicts:
	libavcodec/x86/dsputil_mmx.c
	libavformat/flvenc.c
	libavformat/oggenc.c
	libavformat/wtv.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-07-04 00:45:21 +02:00
Mans Rullgard
0ebcdf5cda Do not include mathematics.h in avutil.h
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-03 21:42:06 +01:00
Mans Rullgard
c9403419b2 avidec: simplify convoluted flow in avi_load_index()
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-03 03:16:00 +01:00
Michael Niedermayer
cbfdfbe846 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  ARM: ac3: update ff_ac3_extract_exponents_neon per 8b7b2d6
  ARM: NEON optimised vector_clip_int32()
  swscale: disable full_chroma_int when converting to non-24/32bpp RGB.
  suggest to use av_get_bytes_per_sample() in av_get_bits_per_sample_format() doxy
  ffmpeg: use av_get_bytes_per_sample() in place of av_get_bits_per_sample_fmt()
  put_bits: remove ALT_BITSTREAM_WRITER
  put_bits: always use intreadwrite.h macros
  libavformat: Add an example how to use the metadata API
  doxygen: Prefer member groups over grouping into modules
  doxygen: be more permissive when searching for API examples
  avformat: doxify the Metadata API
  lavf: restore old behavior for custom AVIOContex with an AVFMT_NOFILE format.
  lavf: use the correct pointer in av_open_input_stream().
  avidec: infer absolute vs relative index from first packet

Conflicts:
	libavformat/Makefile
	libavformat/avidec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-07-03 03:14:10 +02:00
Michael Niedermayer
3074f03a07 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  get_bits: remove x86 inline asm in A32 bitstream reader
  doc: Remove outdated information about our issue tracker
  avidec: Factor out the sync fucntionality.
  fate-aac: Expand coverage.
  ac3dsp: add x86-optimized versions of ac3dsp.extract_exponents().
  ac3dsp: simplify extract_exponents() now that it does not need to do clipping.
  ac3enc: clip coefficients after MDCT.
  ac3enc: add int32_t array clipping function to DSPUtil, including x86 versions.
  swscale: for >8bit scaling, read in native bit-depth.
  matroskadec: matroska_read_seek after after EBML_STOP leads to failure.
  doxygen: fix usage of @file directive in libavutil/{dict,file}.h
  doxygen: Help doxygen parser to understand the DECLARE_ALIGNED and offsetof macros

Conflicts:
	doc/issue_tracker.txt
	libavformat/avidec.c
	libavutil/dict.h
	libswscale/swscale.c
	libswscale/utils.c
	tests/ref/lavfi/pixfmts_scale

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-07-02 03:24:32 +02:00
Alex Converse
d3f610c186 avidec: infer absolute vs relative index from first packet 2011-07-01 16:08:21 -07:00
Alex Converse
8b84af7488 avidec: Factor out the sync fucntionality. 2011-07-01 10:27:06 -07:00
Michael Niedermayer
a7e4342fc1 avidec: consider non video to contain only keyframes when seeking.
Fixes Ticket271

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-06-20 01:58:18 +02:00
ami_stuff
799a87d749 avidec: Ignore unknown stream types
Improves ticket131

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-06-19 03:54:16 +02:00
Michael Niedermayer
2905e3ff64 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  lavc: add opt_find to AVCodecContext class.
  h264: Complexify frame num gap shortening code
  intreadwrite.h: fix AV_RL32/AV_RB32 signedness.
  Fix decoding of mpegts streams with h264 video that does *NOT* have b frames
  Add minor bumps and APIChanges entries for lavf private options.
  ffmpeg: deprecate -vc and -tvstd
  ffmpeg: use new avformat_open_* API.
  ffserver: use new avformat_open_* API.
  ffprobe: use new avformat_open_* API.
  ffplay: use new avformat_open_* API.
  cmdutils: add opt_default2().
  dict: add AV_DICT_APPEND flag.
  lavf: add avformat_write_header() as a replacement for av_write_header().
  Deprecate av_open_input_* and remove their uses.
  lavf: add avformat_open_input() as a replacement for av_open_input_*
  AVOptions: add av_opt_find() as a replacement for av_find_opt.
  AVOptions: add av_opt_set_dict() mapping a dictionary struct to a context.
  ffmpeg: don't abuse a global for passing frame size from input to output
  ffmpeg: don't abuse a global for passing pixel format from input to output
  ffmpeg: initialise encoders earlier.

Conflicts:
	cmdutils.c
	doc/APIchanges
	ffmpeg.c
	ffplay.c
	ffprobe.c
	libavcodec/h264.c
	libavformat/avformat.h
	libavformat/utils.c
	libavformat/version.h
	libavutil/avutil.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-06-18 05:10:38 +02:00
Anton Khirnov
603b8bc2a1 Deprecate av_open_input_* and remove their uses.
Deprecate the last remaining member of AVFormatParameters.
2011-06-16 20:24:56 +02:00
Michael Niedermayer
45fb647495 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  bitstream: Properly promote av_reverse values before shifting.
  libavutil/swscale: YUV444P10/YUV444P9 support.
  H.264: Fix high bit depth explicit biweight
  h264: Fix 10-bit H.264 x86 chroma v loopfilter asm.
  Replace DEBUG_SEEK/DEBUG_SI + av_log combinations by av_dlog.
  Update copyright year for ac3enc_opts_template.c.
  adts: Adjust frame size mask to follow the specification.
  movenc: Add RTP muxer/hinter options
  movenc: Pass the RTP AVFormatContext to the SDP generation
  rtspenc: Add RTP muxer options
  rtspenc: Add an AVClass for setting muxer specific options
  rtpenc_chain: Pass the rtpflags options through to the chained muxer
  rtpenc: Declare the rtp flags private AVOptions in rtpenc.h
  sdp: Reindent after the previous commit
  rtpenc: MP4A-LATM payload support
  avoptions: Add an av_opt_flag_is_set function for inspecting flag fields
  sdp: Allow passing an AVFormatContext to the SDP generation
  mov: Fix wrong timestamp generation for fragmented movies that have time offset caused by the first edit list entry.
  mpeg12: more advanced ffmpeg mpeg2 aspect guessing code.
  swscale: split YUYV output out of yuv2packed[12X]_c().

Conflicts:
	doc/APIchanges
	libavcodec/Makefile
	libavcodec/h264dsp_template.c
	libavcodec/mpeg12.c
	libavformat/aacdec.c
	libavformat/avidec.c
	libavformat/internal.h
	libavformat/movenc.c
	libavformat/rtpenc.c
	libavformat/rtpenc_latm.c
	libavformat/sdp.c
	libavformat/version.h
	libavutil/avutil.h
	libavutil/pixfmt.h
	libswscale/swscale.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-06-11 03:51:36 +02:00
Diego Biurrun
919d7a345a Replace DEBUG_SEEK/DEBUG_SI + av_log combinations by av_dlog. 2011-06-10 19:12:14 +02:00
Michael Niedermayer
f9ecb849ef Merge remote-tracking branch 'qatar/master'
* qatar/master:
  crypto: Use av_freep instead of av_free
  lavf: don't try to free private options if priv_data is NULL.
  swscale: fix types of assembly arguments.
  swscale: move two macros that are only used once into caller.
  swscale: remove unused function.
  options: Add missing braces around struct initializer.
  mov: Remove leftover crufty debug statement with references to a local file.
  dvbsubdec: Fix compilation of debug code.
  Remove all uses of now deprecated metadata functions.
  Move metadata API from lavf to lavu.

Conflicts:
	doc/APIchanges
	libavformat/aiffdec.c
	libavformat/asfdec.c
	libavformat/avformat.h
	libavformat/avidec.c
	libavformat/cafdec.c
	libavformat/matroskaenc.c
	libavformat/mov.c
	libavformat/mp3enc.c
	libavformat/wtv.c
	libavutil/avutil.h
	libavutil/internal.h
	libswscale/swscale.c
	libswscale/x86/swscale_template.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-06-09 04:47:19 +02:00
Anton Khirnov
d2d67e424f Remove all uses of now deprecated metadata functions. 2011-06-08 07:43:45 +02:00
Michael Niedermayer
d552f616a2 Merge remote-tracking branch 'qatar/master'
* qatar/master: (28 commits)
  Remove some non-compiling debug messages.
  ffplay: Fix non-compiling debug printf and replace it by av_dlog.
  H264: x86 predict init cosmetics.
  ac3enc: Fix linking of AC-3 encoder without the E-AC-3 encoder.
  Move E-AC-3 encoder functions to a separate eac3enc.c file.
  ac3enc: remove convenience macro, #define DEBUG
  ac3enc: remove unused #define
  vc1: re-initialize tables after width/height change.
  APIchanges: fill-in git commit hash for av_get_bytes_per_sample() addition
  samplefmt: add av_get_bytes_per_sample()
  iirfilter: fix biquad filter coefficients.
  swscale: remove duplicate conversion routine in swScale().
  swscale: add yuv2planar/packed function typedefs.
  swscale: integrate yuv2nv12X_C into yuv2yuvX() function pointers.
  swscale: reindent x86 init code.
  swscale: extract SWS_FULL_CHR_H_INT conditional into init code.
  swscale: cosmetics.
  swscale: remove alp/chr/lumSrcOffset.
  swscale: un-special-case yuv2yuvX16_c().
  shorten: Remove stray DEBUG #define and corresponding av_dlog statement.
  ...

Conflicts:
	doc/APIchanges
	libavcodec/ac3enc.c
	libavutil/avutil.h
	libavutil/samplefmt.c
	libswscale/swscale.c
	libswscale/swscale_internal.h
	libswscale/x86/swscale_template.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-06-08 05:25:28 +02:00
Diego Biurrun
d7cf5639e7 Replace some printf instances in debug code by av_log. 2011-06-07 13:20:57 +02:00
Mans Rullgard
e65ab9d94f Remove unused variables 2011-06-02 20:06:00 +01:00
Reimar Döffinger
1795364205 Remove unused variables. 2011-05-07 20:14:47 +02:00
Michael Niedermayer
187528441a avidec: correct frame_offset for seeking
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-06 03:54:35 +02:00
Michael Niedermayer
5e24098b84 avidec: detect mpeg4 keyframes in indexless avi
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-06 02:21:36 +02:00
Reimar Döffinger
148ffcd2ce Make DV (sub) demuxer set proper pkt->pos values.
This makes the avi demuxer create packets with proper pos values
with the file from ticket #140.
2011-05-02 18:38:01 +02:00
Reimar Döffinger
1a9f9f81b1 Do not drop packets with no valid ->pos set as e.g. DV-in-AVI produces.
Fixes ticket #140.
2011-04-30 23:06:04 +02:00
Michael Niedermayer
ffdc49df25 AVIDEC: use_odmc demuxer specific option. (mostly an exmaple for demuxer specific options)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-30 22:09:15 +02:00
Michael Niedermayer
3788a3c0c0 Merge remote branch 'qatar/master'
* qatar/master:
  graphparser: add a NULL check on the argument passed to strstr
  setdar: prefer "sar" over "par" in log info message
  fade: fix draw_slice() check on fade->factor value
  fade: make draw_slice() chroma check against planes 1 and 2
  win32: include the correct header in cmdutils.c
  ac3: fix memleak in fixed-point encoder
  flashsv: Return more meaningful error values.
  flashsv: Employ explicit AVCodec struct initializers.
  read AVI palette from the end of extradata
  cosmetics: K&R coding style and more whitespace for Flash Screen Video

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-26 04:21:15 +02:00
Reimar Döffinger
5e9de76f54 Do not set non_interleaved for DV-in-AVI.
It does not make sense (DV is interleaved by design) and
it avoids a crash when the non-interleaved code tries to
use the priv_data of streams created by the DV demuxer.
The crash could be avoided differently, but then that stream
would still lack an index and would not play correctly in
non-interleaved mode.
Fixes e.g. samples/ffmpeg-bugs/roundup/issue1514/Dennis0002_video1.avi
2011-04-25 14:17:59 +02:00
Kostya Shishkov
23f40a0788 read AVI palette from the end of extradata
Official AVI specification says that stream header in case of video contains
BITMAPINFO, which is equal to BITMAPINFOHEADER and optional palette. Currently
lavf AVI demuxer thinks otherwise which produces garbage on codecs that have
both palette and extradata (luckily, there are not so many such codecs).

An example of such file is:
http://samples.multimedia.cx/V-codecs/KMVC/baseball1.avi
(IIRC, MSS1 or MSS2 also had such situation but they are still not supported
by lavc).

As a side note, passing palette in extradata as it's been done previously is
not quite correct since proper _extra_ data is surplus bytes in
BITMAPINFOHEADER, not including palette.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-04-24 23:26:45 -07:00
Michael Niedermayer
fbfcc8f1b7 avi: try to synchronize the points in time of the starts of streams after seeking.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-24 22:38:05 +02:00
Michael Niedermayer
8a68697dc6 Add flag to force demuxers to sort more strictly by dts.
This enables non interleaved AVI mode for example.
Players that are picky on strict interleaving can set this.
Patches to only switch to non intereaved AVI mode when the index is not strictly
correctly interleaved are welcome.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-24 21:48:36 +02:00
Michael Niedermayer
2d2b5a1421 10l, commit that should have been stashed into the merge.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-17 23:59:00 +02:00
Michael Niedermayer
c40798441f Merge remote branch 'qatar/master'
* qatar/master:
  ac3dec: fix processing of delta bit allocation information.
  vc1: fix fate-vc1 after previous commit.
  wmv3dec: fix playback of complex WMV3 files using simple_idct.
  make av_dup_packet() more cautious on allocation failures
  make containers pass palette change in AVPacket
  introduce side information for AVPacket

Politic commits that have not been pulled:
  Update regtest checksums after revision 6001dad.
  Replace more FFmpeg references by Libav.
  Replace references to ffmpeg-devel with libav-devel; fix roundup URL.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-17 23:43:54 +02:00
Diego Biurrun
6001dad6e2 Replace more FFmpeg references by Libav. 2011-04-17 19:31:49 +02:00
Kostya Shishkov
2d8591c27e make containers pass palette change in AVPacket
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-04-15 18:02:05 +02:00
Michael Niedermayer
85b2114759 Merge commit 'a3a0af4fb1237bed0af75868073f9a63db8b1864'
* commit 'a3a0af4fb1237bed0af75868073f9a63db8b1864':
  avutil: make aes and sha api public
  handle malloc failures in ff_get_wav_header
  add xWMA demuxer
  mpegts: force the default timebase
  libavcodec: Bump micro after adding the dtx AVOptions

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-15 04:50:06 +02:00
Max Horn
ca402f32e3 handle malloc failures in ff_get_wav_header
ff_get_wav_header is reading data from a WAVE file and then uses it
(without validation) to malloc a buffer. It then proceeded to read
data into the buffer, without verifying that the allocation succeeded.

To address this, change ff_get_wav_header to return an error if
allocation failed, and adapted all calling code to handle that error.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-04-14 13:56:09 +02:00
Michael Niedermayer
2cae9809e2 Merge remote branch 'qatar/master'
* qatar/master:
  fate: fix partial run when no samples path is specified
  ARM: NEON fixed-point forward MDCT
  ARM: NEON fixed-point FFT
  lavf: bump minor version and add an APIChanges entry for avio changes
  avio: simplify url_open_dyn_buf_internal by using avio_alloc_context()
  avio: make url_fdopen internal.
  avio: make url_open_dyn_packet_buf internal.
  avio: avio_ prefix for url_close_dyn_buf
  avio: avio_ prefix for url_open_dyn_buf
  avio: introduce an AVIOContext.seekable field
  ac3enc: use generic fixed-point mdct
  lavfi: add fade filter
  Change yadif to not use out of picture lines.
  lavc: deprecate AVCodecContext.antialias_algo
  lavc: mark mb_qmin/mb_qmax for removal on next major bump.

Conflicts:
	doc/filters.texi
	libavcodec/ac3enc_fixed.h
	libavcodec/ac3enc_float.h
	libavfilter/Makefile
	libavfilter/allfilters.c
	libavfilter/vf_fade.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-04 02:15:12 +02:00
Anton Khirnov
8978fedaee avio: introduce an AVIOContext.seekable field
Use it instead of url_is_streamed and AVIOContext.is_streamed.
2011-04-03 22:46:40 +02:00
Michael Niedermayer
5b56ad03fa Reimplement stream probe try #2
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-03 16:40:11 +02:00
Mans Rullgard
2912e87a6c Replace FFmpeg with Libav in licence headers
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-19 13:33:20 +00:00
Michael Niedermayer
0fecf2642b Merge remote-tracking branch 'newdev/master'
Conflicts:
	Changelog
	doc/APIchanges
	doc/optimization.txt
	libavformat/avio.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-17 17:22:52 +01:00
Anton Khirnov
45a8a02a41 lavf: replace avio_seek(SEEK_CUR) with avio_skip where it makes sense
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-16 22:24:51 -04:00
Anton Khirnov
db44ea960d avio: avio_ prefix for url_fsize
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 76aa876e69)
2011-03-08 02:09:21 +01:00
Anton Khirnov
66e5b1df36 avio: deprecate url_feof
AVIOContext.eof_reached should be used directly instead.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-07 17:20:31 -05:00
Anton Khirnov
76aa876e69 avio: avio_ prefix for url_fsize
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-07 11:03:39 -05:00
Anton Khirnov
384c9c2fa7 avio: add avio_tell macro as a replacement for url_ftell
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit a2704c9712)
2011-03-05 02:29:31 +01:00
Anton Khirnov
a2704c9712 avio: add avio_tell macro as a replacement for url_ftell
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-04 11:26:57 -05:00
Anton Khirnov
74b3f67c9c lavf: replace all uses of url_fskip with avio_seek
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit e356fc57a2)
2011-03-03 14:15:08 +01:00
Anton Khirnov
f59d8ff8cd avio: avio_ prefix for url_fseek
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 6b4aa5dac8)
2011-03-03 14:15:03 +01:00
Anton Khirnov
e356fc57a2 lavf: replace all uses of url_fskip with avio_seek
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-01 12:22:16 -05:00
Anton Khirnov
6b4aa5dac8 avio: avio_ prefix for url_fseek
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-01 12:12:33 -05:00
Anton Khirnov
e63a362857 avio: avio_ prefixes for get_* functions
In the name of consistency:
get_byte           -> avio_r8
get_<type>         -> avio_r<type>
get_buffer         -> avio_read

get_partial_buffer will be made private later

get_strz is left out becase I want to change it later to return
something useful.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit b7effd4e83)
2011-02-22 02:44:37 +01:00
Anton Khirnov
90ed2776ea avio: rename av_alloc_put_byte -> avio_alloc_context for consistency
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 8d9ac969cb)
2011-02-22 02:44:36 +01:00
Anton Khirnov
b7effd4e83 avio: avio_ prefixes for get_* functions
In the name of consistency:
get_byte           -> avio_r8
get_<type>         -> avio_r<type>
get_buffer         -> avio_read

get_partial_buffer will be made private later

get_strz is left out becase I want to change it later to return
something useful.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-21 11:23:22 -05:00
Anton Khirnov
8d9ac969cb avio: rename av_alloc_put_byte -> avio_alloc_context for consistency
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-21 10:23:44 -05:00
Anton Khirnov
471fe57e1a avio: rename ByteIOContext to AVIOContext.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit ae628ec1fd)
2011-02-20 19:05:47 +01:00
Anton Khirnov
ae628ec1fd avio: rename ByteIOContext to AVIOContext.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-20 08:37:15 -05:00
Anton Khirnov
f8d33a3617 avidec: simplify read_gab2_sub
Use avio functions instead of bytestream ones (also drops dependency on
lavc and removes a bunch of warnings).
Drop custom version of avio_get_str16 and use that instead.

Tested on mewmew-ssa.avi sample.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 47fdf00a77)
2011-02-09 03:31:17 +01:00
Anton Khirnov
47fdf00a77 avidec: simplify read_gab2_sub
Use avio functions instead of bytestream ones (also drops dependency on
lavc and removes a bunch of warnings).
Drop custom version of avio_get_str16 and use that instead.

Tested on mewmew-ssa.avi sample.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-02-06 20:30:28 -05:00
Clément Bœsch
bffad70c66 Remove forgotten if (p) av_free(p) forms
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 290849e2a4)
2011-02-06 20:31:44 +01:00
Clément Bœsch
290849e2a4 Remove forgotten if (p) av_free(p) forms
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-04 10:00:52 +00:00
Luca Barbato
9ef5a9deaf Replace dprintf with av_dlog
dprintf clashes with POSIX.1-2008
(cherry picked from commit dfd2a005eb)
2011-01-30 03:41:48 +01:00
Luca Barbato
dfd2a005eb Replace dprintf with av_dlog
dprintf clashes with POSIX.1-2008
2011-01-29 23:55:37 +01:00
Diego Elio Pettenò
66355be3c3 Prefix all _demuxer, _muxer, _protocol from libavformat and libavdevice.
This also lists the objects from those two libraries as internal (by adding
the ff_ prefix) so that they can then be hidden via linker scripts.
(cherry picked from commit c6610a216e)
2011-01-28 03:15:34 +01:00
Diego Elio Pettenò
c6610a216e Prefix all _demuxer, _muxer, _protocol from libavformat and libavdevice.
This also lists the objects from those two libraries as internal (by adding
the ff_ prefix) so that they can then be hidden via linker scripts.
2011-01-26 22:10:09 +00:00
Mans Rullgard
3e8c4f9689 avidec: make print_tag() a macro and remove related ifdefs
The dprintf macro is a no-op if DEBUG is not defined, so there
is no need to guard it here.

Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 6081f8c4e2)
2011-01-26 03:43:30 +01:00
Mans Rullgard
6081f8c4e2 avidec: make print_tag() a macro and remove related ifdefs
The dprintf macro is a no-op if DEBUG is not defined, so there
is no need to guard it here.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-25 02:43:28 +00:00
Peter Ross
456a70aeb8 add ff_get_bmp_header
Originally committed as revision 26091 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-26 01:23:44 +00:00