Commit Graph

48990 Commits

Author SHA1 Message Date
Michael Niedermayer
d270c32025 avcodec_decode_audio: do not trust the channel layout, use the channel count.
Fixes memory corruption

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-18 01:29:38 +01:00
Michael Niedermayer
4aed4f5846 mlpdec: dont leave a invalid huff_lsb in the context.
Fix assertion failure

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-18 00:23:17 +01:00
Michael Niedermayer
e1d7d4bd13 mpegvideo: reset context state on failed thread update.
Fixes assertion failure

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-17 23:43:35 +01:00
Carl Eugen Hoyos
9a038a95d2 Use new function av_codec_get_tag2() in ffmpeg.c.
Fixes ticket #1953.
2013-01-17 20:46:21 +01:00
Carl Eugen Hoyos
a1a707f728 Add a new function av_codec_get_tag2().
av_codec_get_tag() may return 0 both in case a codec_tag was
found and if no codec_tag was found.
The new function does not have this ambiguity.
2013-01-17 20:44:33 +01:00
Paul B Mahol
8fdd24455e .gitignore: add /doc/examples/pc-uninstalled
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-01-17 17:59:18 +00:00
Carl Eugen Hoyos
ad406f7e40 Only skip MLP header in mpeg files if the codec actually is MLP.
Fixes PCM audio in Kansas Pheasant Hunt 2000 mpg file.
Reported-by: Mashiat Sarker Shakkhar
2013-01-17 17:19:08 +01:00
Carl Eugen Hoyos
12cb21efa6 Make the latm decoder less verbose on initialisation.
Reviewed-by: Paul B Mahol
2013-01-17 16:12:59 +01:00
Michael Niedermayer
46730e7a0c mux/chunked interleaver: better align duration chunks.
This code causes the chunking to tend toward more optimal
alignment between streams.
The first chunks can still be less optimal aligned
2013-01-17 15:11:02 +01:00
Michael Niedermayer
69a96f9d4c mux: de-obfuscate chunked interleaver checks
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-17 15:08:50 +01:00
Michael Niedermayer
c57c1329a9 mux: simplify chunking interleaver code
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-17 14:45:30 +01:00
Michael Niedermayer
2dc9bcad7d Merge remote-tracking branch 'qatar/master'
* qatar/master:
  idcin: fix memleaks in idcin_read_packet()

Conflicts:
	libavformat/idcin.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-17 13:44:37 +01:00
James Almer
b454c64e03 latmenc: Check for LOAS sync word
Write the packet unaltered if found.

Fixes ticket #1917

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-17 04:55:14 +01:00
Carl Eugen Hoyos
c345100efc Fix detection of struct v4l2_frmsize_discrete.
It was always detected successfully.
2013-01-17 02:11:12 +01:00
Michael Niedermayer
765a3ba018 h264: add assert to check that block_offset is consistent.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-17 00:21:58 +01:00
Michael Niedermayer
97d190283e h264: always copy linesizes in thread update
Fixes inconsistencies in context

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-17 00:21:58 +01:00
Michael Niedermayer
f674cc776f h264: always copy block_offset in thread update
Fixes out of array accesses

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-17 00:21:58 +01:00
Paul B Mahol
641bbd9671 vima: switch to init_get_bits8()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-01-16 20:56:14 +00:00
Michael Niedermayer
1191db31c1 mux: fix chunked interleaver
The code did not account properly for packets that where added to
the end of the packet list. Also flags for such packets where not
set correctly leading to incorrect chunked interleaving.

Reported-by: bcoudurier
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-16 20:22:58 +01:00
Michael Niedermayer
b7bc49a957 mips: move vector_fmul_window_mips to libavutil
Reviewed-by: "Babic, Nedeljko" <nbabic@mips.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-16 20:15:48 +01:00
Justin Ruggles
b805c725a3 idcin: fix memleaks in idcin_read_packet()
Fixes fate-id-cin-video failures when running FATE with valgrind.
2013-01-16 12:21:35 -05:00
Nicolas George
0942aa4637 lafv/matroska: add A_OPUS/EXPERIMENTAL codec name.
The exact packing of Opus inside Matroska is not finalized.
Use A_OPUS/EXPERIMENTAL as codec name, like mkvtoolnix.
The A_OPUS name stays to let ffmpeg open files it has produced
until now, but newly produced file use the EXPERIMENTAL version.
Once the spec is stabilized it will be possible to consider
options to ensure compatibility with these files.
2013-01-16 15:53:01 +01:00
Michael Niedermayer
f0cf017dee configure: suppress "enumerated type mixed with another type" for icc
icc should not complain when 2 enum values are combined (for example when
used as flags)
Adding casts to suppress these would not help code quality

Reviewed-by: Carl Eugen Hoyos <cehoyos@ag.or.at>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-16 14:00:39 +01:00
Michael Niedermayer
cae11e4031 mux: fix chunked_duration rounding anomaly
a small value was rounded to 0 and then treated special as if
chunked_duration was 0. This led to a inconsistency that further led
to wrong interleaving

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-16 13:49:02 +01:00
Michael Niedermayer
5c7e9e16c9 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  lavc: Move vector_fmul_window to AVFloatDSPContext
  rtpdec_mpeg4: Check the remaining amount of data before reading

Conflicts:
	libavcodec/dsputil.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-16 12:38:41 +01:00
Nicolas George
0e79fe37e5 lavd/v4l2: init return value.
Fix a warning and random failures.
2013-01-16 12:21:58 +01:00
Michael Niedermayer
1459f34251 Merge commit '977d4a3b8a2dbc2fb5e747c7072485016c9cdfaa'
* commit '977d4a3b8a2dbc2fb5e747c7072485016c9cdfaa':
  rtpdec_mpeg4: Check the return value from malloc
  srtp: Mark a few variables as uninitialized

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-16 12:13:16 +01:00
Michael Niedermayer
9ea65c65f7 Merge commit '0eecafc948b74c247ebbc59f18f508db5d590d0b'
* commit '0eecafc948b74c247ebbc59f18f508db5d590d0b':
  configure: Make the new srtp protocol depend on the rtp protocol
  lavf: Add a fate test for the SRTP functions
  lavu: Add a fate test for the HMAC API

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-16 12:07:27 +01:00
Michael Niedermayer
06af724c56 Merge commit 'fb845ffdd335a1efd6dfd43e8adeb530397b348e'
* commit 'fb845ffdd335a1efd6dfd43e8adeb530397b348e':
  h264: add 3 pixels below for subpixel filter wait position
  dvdsubdec: Support palette in mkv

Conflicts:
	libavcodec/dvdsubdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-16 12:01:21 +01:00
Michael Niedermayer
68f92a70f1 Merge commit 'dae1d507af94261bafd3b11549884e5d1eca590e'
* commit 'dae1d507af94261bafd3b11549884e5d1eca590e':
  x86: Add PAVGB macro to abstract pavgb/pavgusb instruction via cpuflags
  vf_fps: add final flushed frames to the dropped frame count
  rv34_parser: Adjust #if for disabling individual parsers

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-16 11:44:45 +01:00
Stephan Hilb
f245a2086a lavd/v4l2: update broken link to v4l2 video capture example
Reviewed-by: Stefano Sabatini
2013-01-16 11:27:20 +01:00
Stephan Hilb
36810215fa lavd/v4l2: improve debug message
Reviewed-by: Stefano Sabatini
2013-01-16 11:26:38 +01:00
Justin Ruggles
e034cc6c60 lavc: Move vector_fmul_window to AVFloatDSPContext
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-01-16 10:45:45 +01:00
Martin Storsjö
a7ba324413 rtpdec_mpeg4: Check the remaining amount of data before reading
This fixes possible buffer overreads.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-16 11:12:39 +02:00
Michael Niedermayer
bbe56bcd6b motion_est: Limit motion vector search range to MAX_MV
Fixes out of array reads with videos exceeding MAX_MV

Found-by: Thierry Foucu
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-16 05:55:24 +01:00
Michael Niedermayer
5c6283e5c3 mpegvideo: Increase MAX_MV for HD video
Fixes out of array reads

Found-by: Thierry Foucu
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-16 05:51:04 +01:00
Michael Niedermayer
2d372d3a3f h264: document h264_set_parameter_from_sps() re-calling behavior
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-16 05:22:30 +01:00
Michael Niedermayer
31c4a1b7d0 h264: do not mess up cur_chroma_format_idc during thread update
Fixes out of array reads
Regression probably since allowing pixel format changes or a related commit

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-16 05:15:40 +01:00
Ronald S. Bultje
2c85d7c015 h264: add 3 pixels below for subpixel filter wait position.
If the motion vector is at a subpixel position, we need 3 pixels below
the motion vector's wholepel position available, not 2, since the MC
filter is a sixtap filter for the hpel position, and then a bilin filter
for the qpel position.

This patch fixes highly irreproducible (0.1%) fate failures in frame 2
and 4 of h264-conformance-cama2_vtc_b (e.g. first P-frame, first field,
last line of MB x=40,y=2 and second field and last lines of MBs x=39-40,
y=3). These used pre-loopfilter instead of post-loopfilter data because
the await_progress() waited for one line too little in that field, and
the motion vector of these particular MBs happened to align exactly to a
position where that demonstrates the bug.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-16 01:22:30 +01:00
Angelo Haller
e7a39e163d examples/demuxing: free AVPacket after usage
Fix leak.
2013-01-15 23:37:30 +01:00
Stefano Sabatini
c92b6f347d tools: add plotframes script
The script is ported from ffprobe/SourceForge and updated to the current
ffprobe version.
2013-01-15 22:50:19 +01:00
Micah Galizia
10315b1cb8 doc/protocols: document HTTP protocol cookie support
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
2013-01-15 22:26:44 +01:00
Micah Galizia
0b80a12184 lavf/http: add HTTP protocol cookie support
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
2013-01-15 22:26:30 +01:00
Martin Storsjö
977d4a3b8a rtpdec_mpeg4: Check the return value from malloc
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-15 23:18:33 +02:00
Martin Storsjö
0eecafc948 configure: Make the new srtp protocol depend on the rtp protocol
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-15 23:18:08 +02:00
Martin Storsjö
42364fcbca srtp: Mark a few variables as uninitialized
This squelches false positive warnings (with gcc) about them being
used uninitalized.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-15 23:18:08 +02:00
Martin Storsjö
c2603aa25b lavf: Add a fate test for the SRTP functions
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-15 23:18:08 +02:00
Martin Storsjö
3130fa51a5 lavu: Add a fate test for the HMAC API
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-15 23:18:07 +02:00
Ronald S. Bultje
fb845ffdd3 h264: add 3 pixels below for subpixel filter wait position
If the motion vector is at a subpixel position, we need 3 pixels below
the motion vector's wholepel position available, not 2, since the MC
filter is a sixtap filter for the hpel position, and then a bilin filter
for the qpel position.

This patch fixes highly irreproducible (0.1%) fate failures in frame 2
and 4 of h264-conformance-cama2_vtc_b (e.g. first P-frame, first field,
last line of MB x=40,y=2 and second field and last lines of MBs x=39-40,
y=3). These used pre-loopfilter instead of post-loopfilter data because
the await_progress() waited for one line too little in that field, and
the motion vector of these particular MBs happened to align exactly to a
position where that demonstrates the bug.

CC: libav-stable@libav.org

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-01-15 22:00:34 +01:00
Stefano Sabatini
d012059e7b lavd/v4l2: apply grammar/consistency fixes to options help fields 2013-01-15 21:57:37 +01:00