1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-09-08 16:56:57 +02:00
Commit Graph

9887 Commits

Author SHA1 Message Date
Michael Niedermayer
49891784ce Merge remote-tracking branch 'qatar/master'
* qatar/master:
  vsrc_buffer: allow buffering arbitrary number of frames.
  vf_scale: avoid a pointless memcpy in no-op conversion.
  avfiltergraph: try to reduce format conversions in filters.
  avfiltergraph: add an AVClass to AVFilterGraph on next major bump.
  id3v2: fix skipping extended header in id3v2.4

Conflicts:
	libavfilter/vf_scale.c
	libavfilter/vsrc_buffer.c
	libavformat/id3v2.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-02 00:17:02 +02:00
Michael Niedermayer
b3ab337227 audiointerleave: check timebase
Replaces FPE by clean error

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-01 21:21:13 +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
Anton Khirnov
ddb4431208 id3v2: fix skipping extended header in id3v2.4
In v2.4, the length includes the length field itself.
2012-04-01 09:02:24 +02:00
Michael Niedermayer
2f7bd3b516 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  apedec: check bits <= 32.
  cavs: Remove unused code.
  oggenc: fix condition when not to flush due to keyframe granule.
  oggenc: add pagesize option to set preferred page size
  libspeexdec: set frame size in libspeex_decode_init()
  smacker audio: sign-extend the initial 16-bit predicted value

Conflicts:
	libavcodec/apedec.c
	libavcodec/libspeexdec.c
	libavformat/oggenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-01 00:36:43 +02:00
Reimar Döffinger
1a06d6dd86 lxfdec: support version 1 files, too.
Fixes trac issue #656.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-03-31 12:37:42 +02:00
Reimar Döffinger
40393ac568 movenc: add some default cases.
This fixes crashes when copying a data track as in trac
issue #236.
No proper timecode tracks will be written though.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-03-31 12:37:42 +02:00
Reimar Döffinger
50059bde77 MOV: Fix old-style muxed raw-audio data.
This patch fixes the sample from trac issue #522.
The issue is that the mov demuxer insists on using its
calculated sample_size (which is nonsense for old-style tracks)
instead of the one encoded in the track.
The old raw audio code should be using the value in stsz, because
the size of a single sample never makes sense for the size of
a full audio packet, whereas the new code will multiply the
sample size by the chunk size, so it should use the calculated value.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-03-31 12:37:42 +02:00
Reimar Döffinger
e0ad7f74c7 MOV: bail out to toplevel when encountering a trak or mdat chunk.
This patch fixes the sample from trac issue #733.
The issue is that the size of the trak elements is coded
too large, so that the next trak element would be parsed
as part of the first and truncated incorrectly.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-03-31 12:37:42 +02:00
Reimar Döffinger
10b1c060f9 oggenc: fix condition when not to flush due to keyframe granule.
The previous condition of 0 page size was wrong,
that would disable the mechanism for all frames at
a start of a page, thus some keyframes still would not
get their own granule.
The real problem is that header packets must not be flushed,
but they have (and must have) 0 granule and thus would
be detected as keyframes.
Add a separate parameter to mark header packets.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-03-30 16:32:16 -04:00
Andres Gonzalez
ed3e1b485a oggenc: add pagesize option to set preferred page size
When set, if an Ogg stream buffer has enough data, a page is made
instead of filling maximum-size pages. Using smaller pages results
smaller seek intervals at the expense of higher container overhead.

Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-03-30 16:32:03 -04:00
Michael Niedermayer
2b6325cacb Merge remote-tracking branch 'qatar/master'
* qatar/master:
  h264: drop ff_h264_ prefix from static function ff_h264_decode_rbsp_trailing()
  h264: Make ff_h264_decode_end() static, it is not used externally.
  output-example: K&R formatting cosmetics, comment spelling fixes
  avf: make the example output the proper message
  avf: fix audio writing in the output-example
  mov: don't overwrite existing indexes.
  lzw: fix potential integer overflow.
  truemotion: forbid invalid VLC bitsizes and token values.
  truemotion2: handle out-of-frame motion vectors through edge extension.
  configure: Check for a different SDL function

Conflicts:
	configure
	doc/examples/muxing.c
	libavcodec/truemotion2.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-30 22:10:17 +02:00
Michael Niedermayer
a76a2ffe9d libavformat: Fix several "incompatible pointer type" warnings.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-30 19:52:30 +02:00
Diego Biurrun
afd8a3957b output-example: K&R formatting cosmetics, comment spelling fixes 2012-03-30 13:43:29 +02:00
Michael Niedermayer
2b7c0c9fe1 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  mp3dec: perform I/S and M/S only when frame mode is joint stereo.
  id3v2: add another mimetype for JPEG image
  lzw: prevent buffer overreads.
  WMAL: Remove inaccurate and unnecessary doxy
  h264: fix cabac-on-stack after safe cabac reader.
  truemotion2: convert packet header reading to bytestream2.

Conflicts:
	libavcodec/lzw.c
	libavcodec/truemotion2.c
	libavformat/id3v2.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-30 06:05:39 +02:00
Michael Niedermayer
d3d5e84f33 img2dec: remove GLOB_TILDE support.
tilde expansion should/can be done by the shell

Reviewed-by: Alexander Strasser <eclipse7@gmx.net>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-30 05:16:15 +02:00
Luca Barbato
93f6d0475f avf: make the example output the proper message
av_dump_format needs the codecs opened in order to print
them.
2012-03-29 17:07:19 -07:00
Luca Barbato
28db30aa29 avf: fix audio writing in the output-example
av_init_packet does not reset data and size fields in AVPacket,
avcodec_encode_audio2 can use preallocated AVPacket.
2012-03-29 17:07:19 -07:00
Alexander Strasser
3e1ff8eb27 img2dec: Recognize glob meta chars only if prefixed by %
This changes globbing support to only be used if the character
contains at least one glob meta character that is preceded by
an unescaped %. To escape a literal % one would use %% which is
identical to the way to match a % with image2 sequence generation
feature.

* Makes it possible to have patterns like %04d-[720p].jpg work
  again with sequence number generation. Previously this would
  always be detected as a glob pattern and was interpreted by
  the image2 glob code instead.

* Makes it possible to use %*-[720p].jpg to match above pattern
  without having to double escape it to be not interpreted by most
  shells and not by the image2 glob code (previously one would
  need to use \*-\\\[720p\\\].jpg to achieve the same)

Signed-off-by: Alexander Strasser <eclipse7@gmx.net>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-30 00:04:16 +02:00
Brian Olson
0be130e37b img2: glob matching for image series
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-30 00:03:41 +02:00
Ronald S. Bultje
4f7c7624c0 mov: don't overwrite existing indexes.
Prevents all kind of badness if files contain multiple
indexes.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-29 11:36:14 -07:00
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
Kostya Shishkov
f704eb612b id3v2: add another mimetype for JPEG image 2012-03-29 15:49:06 +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