Commit Graph

9865 Commits

Author SHA1 Message Date
Michael Niedermayer 30ced7e69f lavf: print ts values in pts < dts error message
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-29 20:31:14 +02:00
Michael Niedermayer d40ff29cac Merge remote-tracking branch 'qatar/master'
* qatar/master:
  asf: only set index_read if the index contained entries.
  cabac: add overread protection to BRANCHLESS_GET_CABAC().
  cabac: increment jump locations by one in callers of BRANCHLESS_GET_CABAC().
  cabac: remove unused argument from BRANCHLESS_GET_CABAC_UPDATE().
  cabac: use struct+offset instead of memory operand in BRANCHLESS_GET_CABAC().
  h264: add overread protection to get_cabac_bypass_sign_x86().
  h264: reindent get_cabac_bypass_sign_x86().
  h264: use struct offsets in get_cabac_bypass_sign_x86().
  h264: fix overreads in cabac reader.
  wmall: fix seeking.
  lagarith: fix buffer overreads.
  dvdec: drop unnecessary dv_tablegen.h #include
  build: fix doc generation errors in parallel builds
  Replace memset(0) by zero initializations.
  faandct: Remove FAAN_POSTSCALE define and related code.
  dvenc: print allowed profiles if the video doesn't conform to any of them.
  avcodec_encode_{audio,video}: only reallocate output packet when it has non-zero size.
  FATE: add a test for vp8 with changing frame size.
  fate: add kgv1 fate test.
  oggdec: calculate correct timestamps in Ogg/FLAC

Conflicts:
	libavcodec/4xm.c
	libavcodec/cook.c
	libavcodec/dvdata.c
	libavcodec/dvdsubdec.c
	libavcodec/lagarith.c
	libavcodec/lagarithrac.c
	libavcodec/utils.c
	tests/fate/video.mak

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-29 04:11:10 +02:00
Ronald S. Bultje 44257ef426 asf: only set index_read if the index contained entries.
This allows falling back to a binary search if the file contains no
index, thus fixing seeking in such files (e.g. luckynight.wma).
2012-03-28 10:22:25 -07:00
Diego Biurrun a92be9b856 Replace memset(0) by zero initializations.
Also remove one pointless zero initialization in rangecoder.c.
2012-03-28 09:38:33 +02:00
Piotr Bandurski 3c6397404b id3v2: support JPEG APIC with incorrect (image/jpg) MIME type
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-28 02:37:18 +02:00
Paul B Mahol e4cc9f309e Support FLIC in AVI.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-28 02:34:06 +02:00
Justin Ruggles eed691f7d1 oggdec: calculate correct timestamps in Ogg/FLAC
We need to parse the individual packet durations when there is more than one
packet in a page.
2012-03-27 16:11:06 -04:00
Paul B Mahol 55abaa58e5 westwood_vqa: fix SND0 chunk handling
Version from vqa header does not dictate which sound chunks may
appear in file.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-03-27 11:58:15 -04:00
Paul B Mahol f0a343f399 westwood_vqa: set video stream duration
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-03-27 08:54:07 -07:00
Michael Niedermayer dcd013a535 oma: dont over-read buffer
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-27 12:52:53 +02:00
Michael Niedermayer 6999f8bcf5 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  make av_interleaved_write_frame() flush packets when pkt is NULL
  mpegts: Fix dead error checks
  vc1: Do not read from array if index is invalid.
  targa: convert to bytestream2.
  rv34: set mb_num_left to 0 after finishing a frame

Conflicts:
	libavcodec/targa.c
	libavcodec/vc1data.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-27 11:59:39 +02:00
Jindrich Makovicka 904100e5fc make av_interleaved_write_frame() flush packets when pkt is NULL
This patch allows the user to force flushing of all queued packets
by calling av_interleaved_write_frame() with pkt set to NULL.

Signed-off-by: Jindrich Makovicka <jindrich.makovicka@nangu.tv>
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-03-27 11:12:55 +03:00
Alex Converse c9024a9fd7 mpegts: Fix dead error checks 2012-03-26 17:53:51 -07:00
Michael Niedermayer 7e496e1545 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  build: ppc: drop stray leftover backslash
  build: Only clean the architecture subdirectory we build for.
  build: drop some unnecessary dependencies from the H.264 parser
  build: prettyprinting cosmetics
  libavutil: Remove pointless rational test program.
  libavutil: Remove broken and pointless lzo test program.
  lavf doxy: expand AVStream.codec doxy.
  lavf doxy: improve AVStream.time_base doxy.
  lavf doxy: add some basic documentation about reading from the demuxer.
  lavf doxy: document passing options to demuxers.
  lavf doxy: clarify that an AVPacket contains encoded data.
  mpegtsenc: allow user triggered PES packet flushing
  APIchanges: mark the place where 0.7 was cut.
  APIchanges: mark the place where 0.8 was cut.
  APIchanges: fill in missing dates and hashes.
  smacker: convert palette and header reading to bytestream2.
  alac: convert extradata reading to bytestream2.

Conflicts:
	doc/APIchanges
	libavcodec/smacker.c
	libavcodec/x86/Makefile
	libavfilter/Makefile
	libavutil/Makefile

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-26 20:52:52 +02:00
Reimar Döffinger 60497cb984 Enable generic index/seeking for mgsts demuxer.
This depends on the proposed parser change for 0-size packets
in previous mail, otherwise video now plays far too fast.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-03-26 20:03:57 +02:00
Reimar Döffinger 699c61d2f0 Handle 0-size sync packets when only parsing headers.
Currently, the duration of those packets is just discarded
when enabling parsing, thus the output of the Metal Gear Solid
demuxer breaks completely when just setting AVSTREAM_PARSE_HEADERS.
The result will not be correct if a parser creates a delay even
with PARSER_FLAG_COMPLETE_FRAMES and there might be other cases
where it does not work correct, but just discarding them as it
is done currently seems worse.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-03-26 20:03:56 +02:00
Reimar Döffinger fca62f0500 Support FLIC in MOV.
Fixes trac issue #626.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-03-26 20:03:56 +02:00
Michael Niedermayer 3b370abf16 mxfdec: fix off by one error.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-26 15:05:02 +02:00
Diego Biurrun ad0e31f134 build: prettyprinting cosmetics 2012-03-26 13:00:10 +02:00
Anton Khirnov 967923abd1 lavf doxy: expand AVStream.codec doxy. 2012-03-26 10:59:43 +02:00
Anton Khirnov e44ada129c lavf doxy: improve AVStream.time_base doxy.
Remove confusing sentence that implied the user should set the timebase.
Elaborate on how the timebase is set for muxing.
2012-03-26 10:59:43 +02:00
Anton Khirnov f58b8cc3e3 lavf doxy: add some basic documentation about reading from the demuxer. 2012-03-26 10:59:43 +02:00
Anton Khirnov 10fa4ff7bc lavf doxy: document passing options to demuxers. 2012-03-26 10:59:43 +02:00
Anton Khirnov dca9c81d82 lavf doxy: clarify that an AVPacket contains encoded data. 2012-03-26 10:59:42 +02:00
Jindrich Makovicka 3fadb29baf mpegtsenc: allow user triggered PES packet flushing
Signed-off-by: Jindrich Makovicka <jindrich.makovicka@nangu.tv>
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-03-26 11:41:18 +03:00
Michael Niedermayer 33f39c02aa mxfdec: pass correct context to av_timecode_init()
fixes null ptr dereference
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-26 03:13:54 +02:00
Michael Niedermayer 9621646eb3 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  x86: dsputil: prettyprint gcc inline asm
  x86: K&R prettyprinting cosmetics for dsputil_mmx.c
  x86: conditionally compile H.264 QPEL optimizations
  dsputil_mmx: Surround QPEL macros by "do { } while (0);" blocks.
  Ignore generated files below doc/.
  dpcm: convert to bytestream2.
  interplayvideo: convert to bytestream2.
  movenc: Merge if statements
  h264: fix memleak in error path.
  pthread: Immediately release all frames in ff_thread_flush()
  h264: Add check for invalid chroma_format_idc
  utvideo: port header reading to bytestream2.

Conflicts:
	.gitignore
	configure
	libavcodec/h264_ps.c
	libavcodec/interplayvideo.c
	libavcodec/pthread.c
	libavcodec/x86/dsputil_mmx.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-25 23:10:30 +02:00
Paul B Mahol 680981832f "Metal Gear Solid: The Twin Snakes" demuxer
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-25 12:22:06 +02:00
Michael Niedermayer 86e3289ffd mov: fix heap buffer overflow
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-25 04:25:24 +02:00
Michael Niedermayer 8bf95e8bd5 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  avc: Add a function for converting mp4 style extradata to annex b
  pthread: free progress if buffer allocation failed.
  lavc/avconv: support changing frame sizes in codecs with frame mt.
  libavformat: Document who sets the AVStream.id field
  utvideo: mark output picture as keyframe.
  sunrast: Add support for negative linesize.
  vp8: fix update_lf_deltas in libavcodec/vp8.c
  ralf: read Huffman code lengths without GetBitContext

Conflicts:
	ffmpeg.c
	libavcodec/sunrastenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-25 01:56:53 +01:00
Martin Storsjö 68893afe1d movenc: Merge if statements
This isn't exactly equivalent with the earlier code for codecs
other than H264 and VC1, but those are two only codecs supported
by this codepath anyway, and it simplifies it a bit.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-03-25 01:06:49 +02:00
Martin Storsjö d5ed5e7d0c avc: Add a function for converting mp4 style extradata to annex b
Make movenc use this function instead of the current custom
conversion function.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-03-24 22:53:18 +02:00
Martin Storsjö e20ad71ebb libavformat: Document who sets the AVStream.id field
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-03-24 22:17:37 +02:00
Michael Niedermayer 5934d57ba9 xmv: check channel number
Fixes FPE

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-23 10:31:45 +01:00
Michael Niedermayer ac2cb27916 mov: Fix FPE on 0 time_scale
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-23 04:32:16 +01:00
Michael Niedermayer f927c5b753 vorbisdemux: Check private context in theoras gtopts.
This prevents a null ptr dereference.
It could be checked differently but this way it should
be possible to return some data.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-23 04:29:33 +01:00
Michael Niedermayer 01fd1aa0ad matroskadec: fix strcmp(NULL)
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-23 01:27:49 +01:00
Michael Niedermayer 437f5daf0b mov: fix global unicode convertion array overflow.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-23 01:09:04 +01:00
Michael Niedermayer 0c97fd336e mmdemux: dont set pkt->size to an invalid value.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-23 00:50:49 +01:00
Michael Niedermayer 464cef4c14 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  xwma: Validate channels and bits_per_coded_sample.
  mov: Do not read past the end of the ctts_data table.
  mov: Add missing terminator to mov_ch_layout_map_1ch.
  asf: reset side data elements on packet copy.
  wmavoice: fix stack overread.
  wmalossless: error out if a subframe is not used by any channel.
  vqa: check palette chunk size before reading data.
  wmalossless: reset sample pointer for each subframe.
  wmalossless: error out on invalid values for order.

Conflicts:
	libavcodec/vqavideo.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-22 23:16:49 +01:00
Alex Converse 5023b89bba xwma: Validate channels and bits_per_coded_sample.
This prevents a SIGFPE later on.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-22 13:57:12 -07:00
Alex Converse 86f2ae06b9 mov: Do not read past the end of the ctts_data table.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-22 13:57:12 -07:00
Alex Converse 3e6e89b3d6 mov: Add missing terminator to mov_ch_layout_map_1ch.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: Libav-stable@libav.org
2012-03-22 13:56:44 -07:00
Michael Niedermayer 6716e6892b Merge remote-tracking branch 'qatar/master'
* qatar/master:
  FATE: Add ZeroCodec test
  oggparseogm: fix order of arguments of avpriv_set_pts_info().
  pngenc: better upper bound for encoded frame size.
  aiffdec: set block_duration to 1 for PCM codecs that are supported in AIFF-C
  aiffdec: factor out handling of integer PCM for AIFF-C and plain AIFF
  aiffdec: use av_get_audio_frame_duration() to set block_duration for AIFF-C
  aiffdec: do not set bit rate if block duration is unknown
  wmall: output packet only if we have decoded some samples

Conflicts:
	libavcodec/pngenc.c
	tests/fate/lossless-video.mak

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-22 20:59:58 +01:00
Ronald S. Bultje e73c6aaabf asf: reset side data elements on packet copy.
Prevents crash (double free) when free()ing the original packet.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-22 12:17:14 -07:00
Michael Niedermayer f0b4a505d8 oggparseogm: fix order of arguments of avpriv_set_pts_info().
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-03-22 19:51:43 +01:00
Nicolas George afbf9ed0d2 udp: lock all operations on shared variables. 2012-03-22 17:36:23 +01:00
Nicolas George e1838835aa udp: return the error code instead of generic EIO. 2012-03-22 17:36:23 +01:00
Nicolas George 5deb5ccbbb udp: call av_fifo_space directly as needed.
The comment seemed to indicate that left was used
to limit the size of the recv, but it was not so.
2012-03-22 17:36:23 +01:00
Nicolas George 63afc4f638 udp: use non-blocking read instead of select. 2012-03-22 17:36:23 +01:00