Commit Graph

9815 Commits

Author SHA1 Message Date
Ronald S. Bultje
a93b572ae4 smacker: error out if palette copy-with-offset overruns palette size.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-07 09:35:03 -08:00
Carl Eugen Hoyos
a294a7a1b3 mov: Allow last chunk to have an arbitrary number of samples.
Fixes ticket #673.
(cherry picked from commit 8dcd2a41ec)

Signed-off-by: Alex Converse <alex.converse@gmail.com>
2012-03-06 15:25:34 -08:00
Michael Niedermayer
f095391a14 Merge remote-tracking branch 'qatar/master'
* qatar/master: (31 commits)
  cdxl demux: do not create packets with uninitialized data at EOF.
  Replace computations of remaining bits with calls to get_bits_left().
  amrnb/amrwb: Remove get_bits usage.
  cosmetics: reindent
  avformat: do not require a pixel/sample format if there is no decoder
  avformat: do not fill-in audio packet duration in compute_pkt_fields()
  lavf: Use av_get_audio_frame_duration() in get_audio_frame_size()
  dca_parser: parse the sample rate and frame durations
  libspeexdec: do not set AVCodecContext.frame_size
  libopencore-amr: do not set AVCodecContext.frame_size
  alsdec: do not set AVCodecContext.frame_size
  siff: do not set AVCodecContext.frame_size
  amr demuxer: do not set AVCodecContext.frame_size.
  aiffdec: do not set AVCodecContext.frame_size
  mov: do not set AVCodecContext.frame_size
  ape: do not set AVCodecContext.frame_size.
  rdt: remove workaround for infinite loop with aac
  avformat: do not require frame_size in avformat_find_stream_info() for CELT
  avformat: do not require frame_size in avformat_find_stream_info() for MP1/2/3
  avformat: do not require frame_size in avformat_find_stream_info() for AAC
  ...

Conflicts:
	doc/APIchanges
	libavcodec/Makefile
	libavcodec/avcodec.h
	libavcodec/h264.c
	libavcodec/h264_ps.c
	libavcodec/utils.c
	libavcodec/version.h
	libavcodec/x86/dsputil_mmx.c
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-06 06:03:32 +01:00
Reimar Döffinger
632eb1bbae cdxl demux: do not create packets with uninitialized data at EOF.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-03-05 16:27:31 -05:00
Derek Buitenhuis
01606d10e6 libutvideo: Add Ut Video encoder wrapper
All colorspaces are supported.

Renamed libutvideo.cpp to libutvideodec.cpp.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-05 22:25:49 +01:00
Justin Ruggles
94cf64b81f cosmetics: reindent 2012-03-05 13:08:19 -05:00
Justin Ruggles
8c1d6ac66a avformat: do not require a pixel/sample format if there is no decoder
Also, do not keep trying to find and open a decoder in try_decode_frame() if
we already tried and failed once.

Fixes always searching until max_analyze_duration in
avformat_find_stream_info() when demuxing codecs without a decoder.
2012-03-05 13:08:18 -05:00
Justin Ruggles
a7fa75684d avformat: do not fill-in audio packet duration in compute_pkt_fields()
Use the estimated duration only to calculate missing timestamps if needed.
2012-03-05 13:08:18 -05:00
Justin Ruggles
6c65cf58fd lavf: Use av_get_audio_frame_duration() in get_audio_frame_size()
Also, do not give AVCodecContext.frame_size priority for muxing.

Updated 2 FATE references:
dxa-feeble - adds 1 audio frame that is still within 2 seconds as specified
             by -t 2 in the FATE test
wmv8-drm-nodec - durations are not needed. previously they were estimated
                 using the packet size and average bit rate.
2012-03-05 13:08:18 -05:00
Justin Ruggles
f1e73100d9 siff: do not set AVCodecContext.frame_size
also, properly set AVCodecContext.bits_per_coded_sample, AVStreasm.start_time,
and AVPacket.duration.
2012-03-05 13:08:17 -05:00
Justin Ruggles
ec2e767bf3 amr demuxer: do not set AVCodecContext.frame_size.
it is not necessary.
2012-03-05 13:08:17 -05:00
Justin Ruggles
8d1a20aa7c aiffdec: do not set AVCodecContext.frame_size
It is unnecessary. Also, for some codecs we're reading more than 1 frame per
packet. Instead we use a private context variable to calculate the bit rate,
stream duration, and packet durations.

Updated FATE seek test, which has slightly different timestamps due to a
more accurate bit rate calculation.
2012-03-05 13:08:17 -05:00
Justin Ruggles
237a855caf mov: do not set AVCodecContext.frame_size
It is not necessary.
2012-03-05 13:08:17 -05:00
Justin Ruggles
9727264220 ape: do not set AVCodecContext.frame_size.
prevents lavf from setting incorrect packet durations.
2012-03-05 13:08:17 -05:00
Justin Ruggles
2dd18d4435 rdt: remove workaround for infinite loop with aac
avformat_find_stream_info() no longer hangs while waiting for AAC frame_size
2012-03-05 13:08:16 -05:00
Justin Ruggles
9c365fe8ae avformat: do not require frame_size in avformat_find_stream_info() for CELT
In Ogg/CELT, frame_size is found in the same place as the sample_rate and
channels, so we do not need to force the frame_size to be parsed.
2012-03-05 13:08:16 -05:00
Justin Ruggles
fbc8c59679 avformat: do not require frame_size in avformat_find_stream_info() for MP1/2/3
It was only needed to avoid a bad time base (and thus non-monotone timestamps)
for stream copy to avi.
2012-03-05 13:08:16 -05:00
Justin Ruggles
84b6ae0808 avformat: do not require frame_size in avformat_find_stream_info() for AAC
We already will get the needed info because of CODEC_CAP_CHANNEL_CONF
2012-03-05 13:08:16 -05:00
Justin Ruggles
620b88a302 swfenc: use av_get_audio_frame_duration() instead of AVCodecContext.frame_size
This way we can do stream copy without having the demuxer wait until
frame_size has been set.
2012-03-05 13:08:16 -05:00
Justin Ruggles
14aecc50fa rtpenc: use av_get_audio_frame_duration() for max_frames_per_packet
It is more reliable than AVCodecContext.frame_size for codecs with constant
packet duration.
2012-03-05 13:08:16 -05:00
Justin Ruggles
c019070fda riffenc: use av_get_audio_frame_duration()
For encoding, frame_size is not a reliable indicator of packet duration.
Also, we don't want to have to force the demuxer to find frame_size for
stream copy to work.
2012-03-05 13:08:15 -05:00
Aaron Colwell
2e061130f4 matroska : Add support for reading/writing creation_time metadata.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-05 19:02:48 +01:00
Anton Khirnov
27c7ca9c12 lavf: deobfuscate read_frame_internal().
Split off packet parsing into a separate function. Parse full packets at
once and store them in a queue, eliminating the need for tracking
parsing state in AVStream.

The horrible unreadable loop in read_frame_internal() now isn't weirdly
ordered and doesn't contain evil gotos, so it should be much easier to
understand.

compute_pkt_fields() now invents slightly different timestamps for two
raw vc1 tests, due to has_b_frames being set a bit later. They shouldn't
be more wrong (or right) than previous ones.
2012-03-05 18:47:05 +01:00
Anton Khirnov
dcee811505 lavf: make read_from_packet_buffer() more flexible.
Make packet buffer a parameter, don't hardcode it to be
AVFormatContext.packet_buffer.

Also move the function higher in the file, since it will be called from
read_frame_internal().
2012-03-05 18:44:45 +01:00
Anton Khirnov
52b0943f10 lavf: factorize freeing a packet buffer. 2012-03-05 18:44:30 +01:00
Diego Biurrun
0a41f47dc1 dv: Do not redundantly initialize struct members to zero. 2012-03-05 17:02:59 +01:00
Michael Niedermayer
337fa0dbe7 lavf: Do not compute the packet duration based on the bitrate if the frame_size can be determined.
This fixes issues when the bitrate is variable or inaccurate but the
frame size has not been determined yet.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-04 04:27:01 +01:00
Michael Niedermayer
b8afbbca9c lavf: factor out determinable_frame_size()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-04 04:26:12 +01:00
Michael Niedermayer
15c6be8c7d Merge remote-tracking branch 'qatar/master'
* qatar/master:
  tiertexseq: set correct block_align for audio
  tiertexseq: set audio stream start time to 0
  voc/avs: Do not change the sample rate mid-stream.
  segafilm: use the sample rate as the time base for audio streams
  ea: fix audio pts
  psx-str: fix audio pts
  vqf: set packet duration
  tta demuxer: set packet duration
  mpegaudio_parser: do not ignore information from the first parsed frame
  mpegaudio_parser: be less picky about the start position
  thp: set audio packet durations
  avcodec: add a Vorbis parser to get packet duration
  vorbisdec: read the previous window flag for long windows
  lavc: free the output packet when encoding failed or produced no output.
  lavc: preserve avpkt->destruct in ff_alloc_packet().
  lavc: clarify the meaning of AVCodecContext.frame_number.
  mpegts: Pad the packet buffer in handle_packet().
  mpegts: Do not call read_sl_header() when no bytes remain in the buffer.

Conflicts:
	libavcodec/mpegaudio_parser.c
	libavcodec/version.h
	libavformat/mpegts.c
	tests/ref/fate/pva-demux

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-04 04:26:04 +01:00
Justin Ruggles
b7beabab4b tiertexseq: set correct block_align for audio 2012-03-03 17:03:27 -05:00
Justin Ruggles
f9cf91d822 tiertexseq: set audio stream start time to 0
Update FATE test to reflect delayed video due to the file having audio-only
frames prior to the first frame with video.
2012-03-03 17:03:27 -05:00
Justin Ruggles
0883109b27 voc/avs: Do not change the sample rate mid-stream.
Also, set the time base based on the sample rate.
lavf-voc seek test updated to reflect slightly different seek points.
2012-03-03 17:03:27 -05:00
Justin Ruggles
4da374f8a9 segafilm: use the sample rate as the time base for audio streams 2012-03-03 17:03:27 -05:00
Justin Ruggles
ea289186f0 ea: fix audio pts
The time base is 1 / sample_rate, not 90000.
Several more codecs encode the sample count in the first 4 bytes of the
chunk, so we set the durations accordingly. Also, we can set start_time and
packet duration instead of keeping track of the sample count in the demuxer.
2012-03-03 17:03:27 -05:00
Justin Ruggles
01be6fa926 psx-str: fix audio pts
Each packet has 18 sectors with 224/channels samples in each sector.
2012-03-03 17:03:27 -05:00
Justin Ruggles
d0ab585074 vqf: set packet duration
Fixes timestamp calculation.
The FATE reference is updated because timestamp calculations are now more
accurate. Previous timestamps were based on average bit rate.
2012-03-03 17:03:26 -05:00
Justin Ruggles
101c369b7c tta demuxer: set packet duration 2012-03-03 17:03:26 -05:00
Justin Ruggles
5a9b952201 thp: set audio packet durations 2012-03-03 16:58:45 -05:00
Justin Ruggles
5602a464c9 avcodec: add a Vorbis parser to get packet duration
This also allows for removing some of the Vorbis-related hacks.
2012-03-03 16:43:11 -05:00
Michael Niedermayer
f83687bc78 mpegts: fix stack array overread in read_sl_header()
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-03 21:03:11 +01:00
Michael Niedermayer
4a310a19de mpegts: prevent get_bits64() from reading nonsense at the end.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-03 21:02:17 +01:00
Michael Niedermayer
e732d0f608 mpeg-ts: fix handling of size=0 SL headers.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-03 18:35:46 +01:00
Petri Hintukainen
23a5bf9db0 bluray protocol
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-03 04:30:49 +01:00
Alex Converse
1aa708988a mpegts: Pad the packet buffer in handle_packet().
This allows it to be used with get_bits without the thread of overreads.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-02 15:44:42 -08:00
Alex Converse
4df369692e mpegts: Do not call read_sl_header() when no bytes remain in the buffer.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-02 15:44:42 -08:00
Michael Niedermayer
268098d8b2 Merge remote-tracking branch 'qatar/master'
* qatar/master: (29 commits)
  amrwb: remove duplicate arguments from extrapolate_isf().
  amrwb: error out early if mode is invalid.
  h264: change underread for 10bit QPEL to overread.
  matroska: check buffer size for RM-style byte reordering.
  vp8: disable mmx functions with sse/sse2 counterparts on x86-64.
  vp8: change int stride to ptrdiff_t stride.
  wma: fix invalid buffer size assumptions causing random overreads.
  Windows Media Audio Lossless decoder
  rv10/20: Fix slice overflow with checked bitstream reader.
  h263dec: Disallow width/height changing with frame threads.
  rv10/20: Fix a buffer overread caused by losing track of the remaining buffer size.
  rmdec: Honor .RMF tag size rather than assuming 18.
  g722: Fix the QMF scaling
  r3d: don't set codec timebase.
  electronicarts: set timebase for tgv video.
  electronicarts: parse the framerate for cmv video.
  ogg: don't set codec timebase
  electronicarts: don't set codec timebase
  avs: don't set codec timebase
  wavpack: Fix an integer overflow
  ...

Conflicts:
	libavcodec/arm/vp8dsp_init_arm.c
	libavcodec/fraps.c
	libavcodec/h264.c
	libavcodec/mpeg4videodec.c
	libavcodec/mpegvideo.c
	libavcodec/msmpeg4.c
	libavcodec/pnmdec.c
	libavcodec/qpeg.c
	libavcodec/rawenc.c
	libavcodec/ulti.c
	libavcodec/vcr1.c
	libavcodec/version.h
	libavcodec/wmalosslessdec.c
	libavformat/electronicarts.c
	libswscale/ppc/yuv2rgb_altivec.c
	tests/ref/acodec/g722
	tests/ref/fate/ea-cmv

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-03 00:23:10 +01:00
Ronald S. Bultje
9c239f6026 matroska: check buffer size for RM-style byte reordering.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-02 10:32:22 -08:00
Alex Converse
1697c29d75 rmdec: Honor .RMF tag size rather than assuming 18. 2012-03-02 09:31:32 -08:00
Anton Khirnov
56bf24ad78 r3d: don't set codec timebase.
It's not supposed to be set by demuxers.

Set avg_frame_rate and r_frame_rate instead.
2012-03-02 17:21:45 +01:00
Anton Khirnov
efec3bc65a electronicarts: set timebase for tgv video.
The container has no timestamps and the framerate isn't stored in the
data either.
The decoder sets codec timebase to experimentally found value 1/15. Do
the same for the demuxer too, it should at least be better than the
default 1/90000.
2012-03-02 11:11:38 +01:00
Anton Khirnov
e39400c3a8 electronicarts: parse the framerate for cmv video. 2012-03-02 11:11:38 +01:00
Anton Khirnov
1bb3990b56 ogg: don't set codec timebase
Demuxers are not supposed to set it.
2012-03-02 11:11:38 +01:00
Anton Khirnov
1d3144c318 electronicarts: don't set codec timebase
Demuxers are not supposed to set it.
Set stream timebase and framerates instead (this is a cfr container with
no timestamps).
2012-03-02 11:11:38 +01:00
Anton Khirnov
10a6e0c346 avs: don't set codec timebase
Demuxers are not supposed to set it.
Set r_frame_rate and avg_frame_rate instead.
2012-03-02 11:11:38 +01:00
Michael Niedermayer
0b90db01b5 lavf: fix update_initial_durations() so it handles missing durations with the initial timestamp being known.
This fixes duplicate timestamps on mp2 in ts with non seekable input.
It also fixed the fate pva demux timestamps.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-02 06:38:03 +01:00
Ingo Brückl
c05e2be9a2 mp3dec: Fix reading file size and frames in VBRI headers
The fields "Number of Bytes" and "Number of Frames" are mixed up. "Bytes"
come first, "Frames" behind.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Alex Converse <alex.converse@gmail.com>
2012-03-01 15:32:28 -08:00
Michael Niedermayer
1eb7f39c7b Merge remote-tracking branch 'qatar/master'
* qatar/master:
  h264: error out on invalid bitdepth.
  aacsbr: use a swap index for the Y matrix rather than copy buffers.
  huffyuv: do not abort on unknown pix_fmt; instead, return an error.
  lcl: return negative error codes on decode_init() errors.
  rtpenc: Use MB info side data for splitting H263 packets for RFC 2190
  h263enc: Add an option for outputting info about MBs as side data
  avpacket: Add a function for shrinking already allocated side data
  nellymoserdec: Saner and faster IMDCT windowing

Conflicts:
	doc/APIchanges
	libavcodec/avpacket.c
	libavcodec/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-01 23:11:31 +01:00
Diego Biurrun
75c553eb26 rmdec: adjust printf format string specifier to fix warning
libavformat/rmdec.c:383: warning: format ‘%d’ expects type ‘int’, but argument 7 has type ‘int64_t’
2012-03-01 23:11:14 +01:00
Martin Storsjö
984b914c55 rtpenc: Use MB info side data for splitting H263 packets for RFC 2190
This makes the packetization spec compliant for cases where one single
GOB doesn't fit into an RTP packet.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-03-01 16:08:32 +02:00
Michael Niedermayer
79ae084e9b Merge remote-tracking branch 'qatar/master'
* qatar/master: (58 commits)
  amrnbdec: check frame size before decoding.
  cscd: use negative error values to indicate decode_init() failures.
  h264: prevent overreads in intra PCM decoding.
  FATE: do not decode audio in the nuv test.
  dxa: set audio stream time base using the sample rate
  psx-str: do not allow seeking by bytes
  asfdec: Do not set AVCodecContext.frame_size
  vqf: set packet parameters after av_new_packet()
  mpegaudiodec: use DSPUtil.butterflies_float().
  FATE: add mp3 test for sample that exhibited false overreads
  fate: add cdxl test for bit line plane arrangement
  vmnc: return error on decode_init() failure.
  libvorbis: add/update error messages
  libvorbis: use AVFifoBuffer for output packet buffer
  libvorbis: remove unneeded e_o_s check
  libvorbis: check return values for functions that can return errors
  libvorbis: use float input instead of s16
  libvorbis: do not flush libvorbis analysis if dsp state was not initialized
  libvorbis: use VBR by default, with default quality of 3
  libvorbis: fix use of minrate/maxrate AVOptions
  ...

Conflicts:
	Changelog
	doc/APIchanges
	libavcodec/avcodec.h
	libavcodec/dpxenc.c
	libavcodec/libvorbis.c
	libavcodec/vmnc.c
	libavformat/asfdec.c
	libavformat/id3v2enc.c
	libavformat/internal.h
	libavformat/mp3enc.c
	libavformat/utils.c
	libavformat/version.h
	libswscale/utils.c
	tests/fate/video.mak
	tests/ref/fate/nuv
	tests/ref/fate/prores-alpha
	tests/ref/lavf/ffm
	tests/ref/vsynth1/prores
	tests/ref/vsynth2/prores

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-01 03:17:11 +01:00
Justin Ruggles
929dd8c108 dxa: set audio stream time base using the sample rate 2012-02-29 15:45:50 -05:00
Justin Ruggles
aa831c4093 psx-str: do not allow seeking by bytes 2012-02-29 15:45:50 -05:00
Justin Ruggles
bdbf1fa405 asfdec: Do not set AVCodecContext.frame_size 2012-02-29 15:45:50 -05:00
Justin Ruggles
4bf6775e9d vqf: set packet parameters after av_new_packet()
Otherwise the values are overwritten.
2012-02-29 15:45:50 -05:00
Martin Storsjö
07ec1f2140 rtpenc: Fix setting the max packet size
This fixes cases where the user had specified one desired MTU
via an option, and the protocol indicates another one.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-29 16:48:01 +02:00
Anton Khirnov
322537478b Add a minor bump, changelog/APIchanges entry and some documentation for APIC support. 2012-02-29 14:44:22 +01:00
Anton Khirnov
2dfea12058 mp3enc: write attached pictures (APIC). 2012-02-29 14:37:00 +01:00
Anton Khirnov
c68148b1ea mp3enc: move mp3_write_xing() further up in the file.
It will be need by new functions called from mp3_write_trailer().
2012-02-29 14:36:45 +01:00
Anton Khirnov
ba445f5557 id3v2enc: add a function for writing attached pictures.
Unused so far.
2012-02-29 14:31:17 +01:00
Anton Khirnov
24fe1a3b16 id3v2enc: fix writing frame sizes for ID3v2.3
Frame sizes in ID3v2.3 are not synchsafe, they are simply 32be numbers.

In practice this bug is not noticeable unless the frame size takes more
than 7 bits (which is almost never for text frames).
2012-02-29 14:30:14 +01:00
Anton Khirnov
411225aabc id3v2enc: split ff_id3v2_write().
This will allow writing the tag in several steps, needed for writing
attached pictures.
2012-02-29 14:26:14 +01:00
Anton Khirnov
c199817748 id3v2enc: make id3v2_put_size take only an AVIOContext.
It has no need of full AVFormatContext.
2012-02-29 14:25:33 +01:00
Anton Khirnov
393fd0d89e id3v2: remove unused ff_id3v2_read().
Rename ff_id3v2_read_all to ff_id3v2_read().
2012-02-29 14:19:42 +01:00
Anton Khirnov
079ea6ca5f lavf: export id3v2 attached pictures as streams. 2012-02-29 14:16:32 +01:00
Anton Khirnov
dd2a4bcfd7 lavf: generic code for exporting attached pictures. 2012-02-29 14:16:25 +01:00
Anton Khirnov
a93b09cb45 id3v2: read attached pictures and export them in ID3v2ExtraMeta. 2012-02-29 14:14:48 +01:00
Anton Khirnov
b73ad74660 lavf: move CodecMime from matroska.h to internal.h
it will be useful for attached pictures in ID3v2
2012-02-29 13:57:59 +01:00
Anton Khirnov
eaea76d72c swfdec: do not set codec timebase.
It is not supposed to be set outside of lavc.

Fixes a divide by zero when the stored framerate is 0.
2012-02-29 13:52:55 +01:00
Anton Khirnov
4f07f8196c lavc: deprecate AVCodecContext.color_table_id.
It's currently only used as temporary storage by the mov demuxer. Make
it use a local variable instead.
2012-02-29 07:25:00 +01:00
Anton Khirnov
63efd83ae1 mpegvideo_enc: add chroma/luma_elim_threshold private options.
Deprecate corresponding AVCodecContext fields.
2012-02-29 07:23:31 +01:00
Ronald S. Bultje
bb6d5411e1 asf: don't seek back on EOF.
Seeking back on EOF will reset the EOF flag, causing us to re-enter
the loop to find the next marker in the ASF file, thus potentially
causing an infinite loop.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-02-28 16:25:05 -08:00
Michael Niedermayer
0e6aa0fef5 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  adpcm: Clip step_index values read from the bitstream at the beginning of each frame.
  oma: don't read beyond end of leaf_table.
  doxygen: Remove documentation for non-existing parameters; misc small fixes.
  Indeo3: fix crashes on corrupt bitstreams.
  msmpeg4: Replace forward declaration by proper #include.
  segment: implement wrap around
  avf: reorder AVStream and AVFormatContext
  aacdec: Remove erroneous reference to global gain from the out of bounds scalefactor error message.

Conflicts:
	libavcodec/indeo3.c
	libavformat/avformat.h
	libavutil/avutil.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-29 00:30:35 +01:00
Ronald S. Bultje
6e57a02b9f asf: error out on ridiculously large minpktsize values.
They cause various issues further down in demuxing.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-02-28 14:32:34 -08:00
Ronald S. Bultje
934cd18a43 oma: don't read beyond end of leaf_table.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-02-28 11:58:13 -08:00
Diego Biurrun
cfac648e6a doxygen: Remove documentation for non-existing parameters; misc small fixes. 2012-02-28 20:48:43 +01:00
Philip de Nier
34210e8df1 mxfdec: set pixel format for cdci picture formats
The properties of the CDCI Descriptor are insufficient to specify
the pixel format for uncompressed picture data. SMPTE 377-1 and
RP224v10 have defined a set of picture coding labels to indicate what
formatting was used.

This patch uses 2 labels to detect UYVY422 or YUYV422 pixel formats.

It defaults to UYVY422 for 8-bit 4:2:2 pictures to support files
that were created before the coding labels were introduced ~2008

The codec pix_fmt default was changed from 0 (PIX_FMT_YUV420P) to
-1 (PIX_FMT_NONE)

Reviewed-by: Baptiste Coudurier <baptiste.coudurier@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-28 20:24:01 +01:00
Philip de Nier
c2d11a8b86 mxfdec: detect uncomp pictures using essence container ul
This supports detection of uncompressed picture in files that
didn't include a Picture Coding Label. The lables weren't
available until SMPTE 377-1 and RP224v10

Reviewed-by: Baptiste Coudurier <baptiste.coudurier@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-28 20:22:53 +01:00
Philip de Nier
51d632cc8f mxf: add uncompressed 422 8-bit rawvideo label
Reviewed-by: Baptiste Coudurier <baptiste.coudurier@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-28 20:21:48 +01:00
Philip de Nier
3592bd509c mxfdec: set track edit rate num/den in expected order
This matches the order used for the index table edit rate.

Reviewed-by: Baptiste Coudurier <baptiste.coudurier@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-28 20:20:51 +01:00
Philip de Nier
627cd3841b mxf: fix v210 label matching len
Must check all 16 bytes because there is a planar 10-bit format
label that has equal first 15 bytes

Review-by: Baptiste Coudurier <baptiste.coudurier@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-28 20:20:05 +01:00
Michael Niedermayer
4f5d1468f5 omadec: Fix wrong number of array elements.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-28 18:41:44 +01:00
Philip de Nier
539a8469ae add v210 to intra only list to allow "-vcodec copy"
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-28 16:43:14 +01:00
Luca Barbato
0c1759ac4b segment: implement wrap around
Provide a way to wrap around the segment index so pseudostreaming
live through a web server and html5 browser is simpler.

Also ensure that 0 (disable) is a valid value across the options
providing wrap around.
2012-02-28 15:01:20 +01:00
Luca Barbato
ee42df8a35 avf: reorder AVStream and AVFormatContext 2012-02-28 15:01:20 +01:00
Michael Niedermayer
8b1cd25ca7 pmpdec: Check for zero audio packets.
This fixes a division by 0.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-28 07:20:36 +01:00
Michael Niedermayer
e3822886eb Merge remote-tracking branch 'qatar/master'
* qatar/master:
  avcodec_default_reget_buffer(): fix compilation in DEBUG mode
  fate: Overhaul WavPack coverage
  h264: fix mmxext chroma deblock to use correct TC values.
  flvdec: Remove the now redundant check for known broken metadata creator
  flvdec: Validate index entries added from metadata while reading
  rtsp: Handle requests from server to client
  movenc: use timestamps instead of frame_size for samples-per-packet
  movenc: use the first cluster duration as the tfhd default duration
  movenc: factorize calculation of cluster duration into a separate function
  doc/APIchanges: fill in missing dates and hashes.
  lavc: reorder AVCodecContext fields.
  lavc: reorder AVFrame fields.

Conflicts:
	doc/APIchanges
	libavcodec/avcodec.h
	libavformat/flvdec.c
	libavformat/movenc.c
	tests/fate/lossless-audio.mak

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-28 03:38:58 +01:00
Michael Niedermayer
e60bdb7e5c flvdec: Remove the now redundant check for known broken metadata creator
The index validation identifies these indexes as broken.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-27 12:07:24 +02:00
Martin Storsjö
7e297a46db flvdec: Validate index entries added from metadata while reading
By validating the index entries while reading, we don't need to
seek at startup to validate the entries. If the error in the
index entries is not pointing to (our definition of) the start
of packets, and there is an index entry pointing at some of the
first packets after the metadata, the invalid index can be discarded
almost immediately.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-27 12:07:24 +02:00
Tommy Winther
1a6b9a98ce rtsp: Handle requests from server to client
This returns 200 OK for OPTIONS requests and 501 Not Implemented
for all other requests.

Even though this doesn't do much actual handling of the requests,
it makes the code properly identify server requests as such, instead
of interpreting it as a reply to the client's request as it did
before.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-27 12:04:11 +02:00
Justin Ruggles
f234e8a32e movenc: use timestamps instead of frame_size for samples-per-packet
For encoding, AVCodecContext.frame_size is the number of input samples to
send to the encoder and does not necessarily correspond directly to the
timestamps of the output packets.
2012-02-27 04:33:37 -05:00
Justin Ruggles
f3dab5fb6d movenc: use the first cluster duration as the tfhd default duration 2012-02-27 04:33:37 -05:00
Justin Ruggles
681d17264f movenc: factorize calculation of cluster duration into a separate function 2012-02-27 04:33:37 -05:00
Reimar Döffinger
d7804de351 cdxl demux: do not create packets with uninitialized data at EOF.
Fixes a failure in cdxl-pal8 test for the valgrind FATE instance.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-02-26 19:39:59 +01:00
Anton Khirnov
7929e22bde lavf: don't guess r_frame_rate from either stream or codec timebase.
Neither of those is guaranteed to be connected to framerate in any way
(if it even exists).

Fixes bug 56.
2012-02-26 19:32:33 +01:00
Anton Khirnov
d3783f47ee lavf: don't set codec timebase in avformat_find_stream_info().
It's not supposed to be set outside of lavc.
2012-02-26 07:51:12 +01:00
Anton Khirnov
87d7a92b62 rawdec: set timebase to 1/fps. 2012-02-26 07:30:21 +01:00
Michael Niedermayer
305e4b35ea Merge remote-tracking branch 'qatar/master'
* qatar/master: (34 commits)
  mlp_parser: fix the channel mask value used for the top surround channel
  vorbisenc: check all allocations for failure
  roqaudioenc: return AVERROR codes instead of -1
  roqaudioenc: set correct bit rate
  roqaudioenc: use AVCodecContext.frame_size correctly.
  roqaudioenc: remove unneeded sample_fmt check
  ra144enc: use int16_t* for input samples rather than void*
  ra144enc: set AVCodecContext.coded_frame
  ra144enc: remove unneeded sample_fmt check
  nellymoserenc: set AVCodecContext.coded_frame
  nellymoserenc: improve error checking in encode_init()
  nellymoserenc: return AVERROR codes instead of -1
  libvorbis: improve error checking in oggvorbis_encode_init()
  mpegaudioenc: return AVERROR codes instead of -1
  libfaac: improve error checking and handling in Faac_encode_init()
  avutil: add AVERROR_UNKNOWN
  check for coded_frame allocation failure in several audio encoders
  audio encoders: do not set coded_frame->key_frame.
  g722enc: check for trellis data allocation error
  libspeexenc: export encoder delay through AVCodecContext.delay
  ...

Conflicts:
	doc/APIchanges
	libavcodec/avcodec.h
	libavcodec/fraps.c
	libavcodec/kgv1dec.c
	libavcodec/libfaac.c
	libavcodec/libgsm.c
	libavcodec/libvorbis.c
	libavcodec/mlp_parser.c
	libavcodec/roqaudioenc.c
	libavcodec/vorbisenc.c
	libavutil/avutil.h
	libavutil/error.c
	libavutil/error.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-26 05:11:21 +01:00
Ronald S. Bultje
cd40c31ee9 matroska: don't overwrite string values until read/alloc was succesful.
This prevents certain tags with a default value assigned to them (as per
the EBML syntax elements) from ever being assigned a NULL value. Other
parts of the code rely on these being non-NULL (i.e. they don't check for
NULL before e.g. using the string in strcmp() or similar), and thus in
effect this prevents crashes when reading of such specific tags fails,
either because of low memory or because of targeted file corruption.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-02-25 07:53:23 -08:00
Michael Niedermayer
b008ac18bb Merge remote-tracking branch 'qatar/master'
* qatar/master:
  docs: use -bsf:[vas] instead of -[vas]bsf.
  mpegaudiodec: Prevent premature clipping of mp3 input buffer.
  lavf: move the packet keyframe setting code.
  oggenc: free comment header for all codecs
  lcl: error out if uncompressed input buffer is smaller than framesize.
  mjpeg: abort decoding if packet is too large.
  golomb: use HAVE_BITS_REMAINING() macro to prevent infloop on EOF.
  get_bits: add HAVE_BITS_REMAINING macro.
  lavf/output-example: use new audio encoding API correctly.
  lavf/output-example: more proper usage of the new API.
  tiff: Prevent overreads in the type_sizes array.
  tiff: Make the TIFF_LONG and TIFF_SHORT types unsigned.
  apetag: do not leak memory if avio_read() fails
  apetag: propagate errors.
  SBR DSP x86: implement SSE sbr_hf_g_filt
  SBR DSP x86: implement SSE sbr_sum_square_sse
  SBR DSP: use intptr_t for the ixh parameter.

Conflicts:
	doc/bitstream_filters.texi
	doc/examples/muxing.c
	doc/ffmpeg.texi
	libavcodec/golomb.h
	libavcodec/x86/Makefile
	libavformat/oggenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-25 04:00:43 +01:00
Michael Niedermayer
418403662b rmdec: fix "warning: format %d expects argument of type int, but argument 7 has type int64_t"
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-25 02:33:30 +01:00
Michael Niedermayer
4dbdd3ec6f mp3enc: fix "warning: best_bitrate_idx may be used uninitialized in this function"
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-25 02:17:37 +01:00
Michael Niedermayer
1e44dda825 flvdec: fix "libavformat/flvdec.c:195:29: warning: variable size1 set but not used"
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-25 02:12:09 +01:00
Anton Khirnov
655b24c01c lavf: move the packet keyframe setting code.
compute_pkt_fields() is for unreliable estimates or guessing. The
keyframe information from the parser is (at least in theory) reliable,
so it should be used even when the other guessing is disabled with the
AVFMT_FLAG_NOFILLIN flag.

Therefore, move setting the packet keyframe flag based on parser
information from compute_pkt_fields() to read_frame_internal().
2012-02-24 19:43:02 +01:00
Justin Ruggles
9677247b0a oggenc: free comment header for all codecs
fixes a memleak for Vorbis and Theora, where the comment header from
avpriv_split_xiph_headers() is replaced by a buffer that must be freed
separately.
2012-02-24 13:15:41 -05:00
Anton Khirnov
5ff42e3138 lavf/output-example: use new audio encoding API correctly. 2012-02-24 09:44:18 +01:00
Anton Khirnov
6e9ed7c7ae lavf/output-example: more proper usage of the new API.
Passing the codec into avformat_new_stream() is preferred.
2012-02-24 09:44:17 +01:00
Michael Niedermayer
e2cc39b609 Merge remote-tracking branch 'qatar/master'
* qatar/master: (40 commits)
  swf: check return values for av_get/new_packet().
  wavpack: Don't shift minclip/maxclip
  rtpenc: Expose the max packet size via an avoption
  rtpenc: Move max_packet_size to a context variable
  rtpenc: Add an option for not sending RTCP packets
  lavc: drop encode() support for video.
  snowenc: switch to encode2().
  snowenc: don't abuse input picture for storing information.
  a64multienc: switch to encode2().
  a64multienc: don't write into output buffer when there's no output.
  libxvid: switch to encode2().
  tiffenc: switch to encode2().
  tiffenc: properly forward error codes in encode_frame().
  lavc: drop libdirac encoder.
  gifenc: switch to encode2().
  libvpxenc: switch to encode2().
  flashsvenc: switch to encode2().
  Remove libpostproc.
  lcl: don't overwrite input memory.
  swscale: take first/lastline over/underflows into account for MMX.
  ...

Conflicts:
	.gitignore
	Makefile
	cmdutils.c
	configure
	doc/APIchanges
	libavcodec/Makefile
	libavcodec/allcodecs.c
	libavcodec/libdiracenc.c
	libavcodec/libxvidff.c
	libavcodec/qtrleenc.c
	libavcodec/tiffenc.c
	libavcodec/utils.c
	libavformat/mov.c
	libavformat/movenc.c
	libpostproc/Makefile
	libpostproc/postprocess.c
	libpostproc/postprocess.h
	libpostproc/postprocess_altivec_template.c
	libpostproc/postprocess_internal.h
	libpostproc/postprocess_template.c
	libswscale/swscale.c
	libswscale/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-24 02:57:18 +01:00
Paul B Mahol
14c98973f5 apetag: do not leak memory if avio_read() fails
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-02-23 16:16:37 -08:00
Ronald S. Bultje
6d11057006 apetag: propagate errors.
Fixes crashes if reading the tag value fails.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-02-23 15:53:26 -08:00
Michael Niedermayer
29a8f6b8d4 udp: Fix sign of error codes.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-23 23:24:14 +01:00
Ronald S. Bultje
31632e73f4 swf: check return values for av_get/new_packet().
Prevents crashers when using the packet if allocation failed.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-02-23 12:24:58 -08:00
Martin Storsjö
ba605cef79 rtpenc: Expose the max packet size via an avoption
This allows opting for a lower MTU than what the AVIOContext
indicated, and allows writing into outputs that don't indicate
an MTU at all (such as plain files, which is useful for testing).

This also allows querying for the MTU via the avoption.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-23 21:32:52 +02:00
Martin Storsjö
f553462041 rtpenc: Move max_packet_size to a context variable
This is in preparation for exposing this via an avoption.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-23 21:32:52 +02:00
Martin Storsjö
7337484ed2 rtpenc: Add an option for not sending RTCP packets
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-23 21:32:52 +02:00
Nicolas George
b6ff81d63b sbgdec: read_seek was undeprecated. 2012-02-23 16:00:22 +01:00
Martin Storsjö
ada4e362b9 rtpenc: Add an error message
Also return a proper error code.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-23 16:30:09 +02:00
Martin Storsjö
c4584f3c1f rtpenc: Allow packetizing H263 according to the old RFC 2190
According to newer RFCs, this packetization scheme should only
be used for interfacing with legacy systems.

Implementing this packetization mode properly requires parsing
the full H263 bitstream to find macroblock boundaries (and knowing
their macroblock and gob numbers and motion vector predictors).

This implementation tries to look for GOB headers (which
can be inserted by using -ps <small number>), but if the GOBs
aren't small enough to fit into the MTU, the packetizer blindly
splits packets at any offset and claims it to be a GOB boundary
(by using Mode A from the RFC). While not correct, this seems
to work with some receivers.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-23 15:27:52 +02:00
Martin Storsjö
c2ff63e3ac rtpenc: Move the trailing comma into FF_RTP_FLAG_OPTS
This simplifies adding more flags to the macro.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-23 15:27:42 +02:00
Compn
b18c27def8 riff: IPJ2 decodes with j2k decoder. samples can be made from mencoder and jp2avi.dll codec. 2012-02-22 23:34:45 -05:00
Michael Niedermayer
e99f1a8cc8 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  dxva2: don't check for DXVA_PictureParameters->wDecodedPictureIndex
  img2: split muxer and demuxer into separate files
  rm: prevent infinite loops for index parsing.
  aac: fix infinite loop on end-of-frame with sequence of 1-bits.
  mov: Add more HDV and XDCAM FourCCs.
  lavf: don't set AVCodecContext.has_b_frames in compute_pkt_fields().
  rmdec: when using INT4 deinterleaving, error out if sub_packet_h <= 1.
  cdxl: correctly synchronize video timestamps to audio
  mlpdec_parser: fix a few channel layouts.
  Add channel names to channel_names[] array for channels added in b2890f5
  movenc: Buffer the mdat for the initial moov fragment, too
  flvdec: Ignore the index if the ignidx flag is set
  flvdec: Fix indentation
  movdec: Don't parse all fragments if ignidx is set
  movdec: Restart parsing root-level atoms at the right spot
  prores: use natural integer type for the codebook index
  mov: Add support for MPEG2 HDV 720p24 (hdv4)
  swscale: K&R formatting cosmetics (part I)
  swscale: variable declaration and placement cosmetics

Conflicts:
	configure
	libavcodec/aacdec.c
	libavcodec/mlp_parser.c
	libavformat/flvdec.c
	libavformat/img2.c
	libavformat/isom.h
	libavformat/mov.c
	libavformat/movenc.c
	libswscale/rgb2rgb.c
	libswscale/rgb2rgb_template.c
	libswscale/yuv2rgb.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-23 04:31:55 +01:00
Justin Ruggles
3798205a77 mov: set channel layout for AC-3 streams based on the 'dac3' atom info
fixes Bug 225
2012-02-22 20:07:02 -05:00
Paul B Mahol
15b4b505c2 img2: split muxer and demuxer into separate files
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-02-22 22:04:03 +01:00
Ronald S. Bultje
aac07a7a4c rm: prevent infinite loops for index parsing.
Specifically, prevent jumping back in the file for the next index, since
this can lead to infinite loops where we jump between indexes referring
to each other, and don't read indexes that don't fit in the file.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-02-22 12:00:23 -08:00
Alex Converse
b142496c56 mov: Add more HDV and XDCAM FourCCs.
Reference: VLC
2012-02-22 11:23:43 -08:00
Anton Khirnov
0584e3ca97 lavf: don't set AVCodecContext.has_b_frames in compute_pkt_fields().
It is not supposed to be done outside lavc.

This is basically a revert of 818062f2f3.

It is unclear what issue this was supposed to fix, if it reappears again
it will have to be fixed in a more proper place.

The wtv-demux test change is because the sample starts with a B-frame.
2012-02-22 19:31:06 +01:00
Ronald S. Bultje
e30b3e59a4 rmdec: when using INT4 deinterleaving, error out if sub_packet_h <= 1.
We read sub_packet_h / 2 packets per line of data (during deinterleaving),
which equals zero if sub_packet_h <= 1, thus causing us to not read any
data, leading to an infinite loop.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-02-22 09:17:27 -08:00
Paul B Mahol
58700edb94 cdxl: correctly synchronize video timestamps to audio
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-02-22 10:50:42 -05:00
Martin Storsjö
0c7b8b758a movenc: Buffer the mdat for the initial moov fragment, too
This allows writing QuickTime-compatible fragmented mp4 (with
a non-empty moov atom) to a non-seekable output.

This buffers the mdat for the initial fragment just as it does
for all normal fragments, too. Previously, the resulting
atom structure was mdat,moov, moof,mdat ..., while it now
is moov,mdat, moof,mdat.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-22 12:27:39 +02:00
Martin Storsjö
b70f04c261 flvdec: Ignore the index if the ignidx flag is set
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-22 12:27:24 +02:00
Martin Storsjö
0a7ce3caa8 flvdec: Fix indentation
Also split a long line.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-22 12:27:15 +02:00
Martin Storsjö
aa96d433e2 movdec: Don't parse all fragments if ignidx is set
In nonseekable files, we already stop parsing the toplevel atoms
after finding moov and one mdat. In large seekable files (or files
that are seekable, but slowly, e.g. http), reading all the fragments
at the start can take a considerable amount of time. This allows
opting out from this behaviour.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-22 10:39:15 +02:00
Martin Storsjö
383a3b64cb movdec: Restart parsing root-level atoms at the right spot
If parsing moov+mdat in a non-seekable file, we currently
abort parsing directly after parsing the header of the mdat
atom. If we want to continue parsing later (if looking to
parse later fragments), we need to skip past the content of the
mdat atom, otherwise we end up parsing the content of the mdat
atom as root level atoms.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-22 10:39:14 +02:00
Michael Niedermayer
184fc600e1 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  mpegvideo_enc: only allocate output packet when we know there will be output
  Add names for more channel layouts to the channel layout map.
  sunrast: Add a sample request for RMP_RAW colormap.
  avcodec: do not override pts or duration from the audio encoder
  Add prores regression test.
  Enable already existing rso regression test.
  Add regression test for "sox" format muxer/demuxer.
  Add dpx encoding regression test.
  swscale: K&R formatting cosmetics for PowerPC code (part I/II)
  img2: Use ff_guess_image2_codec(filename) shorthand where appropriate.
  Clarify licensing information about files borrowed from libjpeg.
  Mark mutable static data const where appropriate.
  avplay: fix -threads option
  dvbsubdec: avoid undefined signed left shift in RGBA macro
  mlpdec: use av_log_ask_for_sample()
  gif: K&R formatting cosmetics
  png: make .long_name more descriptive
  movdec: Adjust keyframe flagging in fragmented files
  rv34: change most "int stride" into "ptrdiff_t stride".

Conflicts:
	avprobe.c
	ffplay.c
	libavcodec/mlpdec.c
	libavcodec/mpegvideo_enc.c
	libavcodec/pngenc.c
	libavcodec/x86/v210-init.c
	libavfilter/vf_boxblur.c
	libavfilter/vf_crop.c
	libavfilter/vf_drawtext.c
	libavfilter/vf_lut.c
	libavfilter/vf_overlay.c
	libavfilter/vf_pad.c
	libavfilter/vf_scale.c
	libavfilter/vf_select.c
	libavfilter/vf_setpts.c
	libavfilter/vf_settb.c
	libavformat/img2.c
	libavutil/audioconvert.c
	tests/codec-regression.sh
	tests/lavf-regression.sh
	tests/ref/lavf/dpx
	tests/ref/vsynth1/prores
	tests/ref/vsynth2/prores

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-22 02:24:18 +01:00
Michael Niedermayer
92b5f71a7d lavf: Reimplement new seek API emulation
This fixes seeking to before and after files with ffplay.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-21 23:55:47 +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
Alex Converse
0ad522afb3 mov: Add support for MPEG2 HDV 720p24 (hdv4) 2012-02-21 14:20:28 -08:00
Diego Biurrun
3f486e0dae img2: Use ff_guess_image2_codec(filename) shorthand where appropriate. 2012-02-21 20:17:56 +01:00
Alex Converse
b0f29db5c2 Mark mutable static data const where appropriate. 2012-02-21 09:47:07 -08:00
Aneesh Dogra
33510e86b1 gif: K&R formatting cosmetics
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-02-21 15:47:06 +01:00
Martin Storsjö
a5c50913a8 movdec: Adjust keyframe flagging in fragmented files
For video, mark the first sample in a trun which doesn't have the
sample-is-non-sync-sample flag set as a keyframe.

In particular, the "sample does not depend on other samples" flag
isn't enough to make it a keyframe, since later frames still can
reference frames prior to that one (the flag only says that that
particular frame doesn't depend on other frames).

This fixes bug 215.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-21 14:19:20 +02:00