31587 Commits

Author SHA1 Message Date
Kostya Shishkov
dec458b900 rv10/20: tell decoder to use edge emulation
This removes out-of-edge motion compensation artifacts (easily spotted green
blocks in avplay, gray blocks in transcoding), for example here:
http://samples.libav.org/samples/real/tv_watching_t1.rm

Signed-off-by: Diego Biurrun <diego@biurrun.de>
(cherry picked from commit 331971116d7d36743601bd2dc5384c5211d3bb48)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:30 +02:00
Luca Barbato
fe3e7297fe flvenc: use int64_t to store offsets
Metadata currently is written only at the start of the file in normal
cases, when transcoding from a rtmp source metadata could be
written later and the offset recorded can exceed 32bit.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit 7f5bf4fbaf1f2142547321a16358f9871fabdcc6)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:30 +02:00
Reimar Döffinger
28321b777f VC-1: fix reading of custom PAR.
Custom PAR num/denum are in 1-256 range.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
(cherry picked from commit 0e8696551414d4ea0aab2559f9475d1fe49d08f3)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:30 +02:00
Dustin Brody
59a22afa0b h264: notice memory allocation failure
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit bac3ab13ea6a9dd8853e79ef3eacf51d234c8774)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:30 +02:00
Justin Ruggles
042934e786 Remove incorrect info in documentation of AVCodecContext.bits_per_raw_sample.
bits_per_raw_sample is used in video as well, where sample_fmt is not used.
(cherry picked from commit d271d5b2152cafe540f3ab71d3be6ce8636d2fd6)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:30 +02:00
Baptiste Coudurier
67163d751b libx264: do not set pic quality if no frame is output
Avoids uninitialized reads.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit 5caa2de19ece830e32c95731bc92a423d55cff0c)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:30 +02:00
Alex Converse
96a453eb85 aac: Remove some suspicious illegal memcpy()s from LTP.
(cherry picked from commit a6c49f18abacb9bf52d4d808a2a56561a5b5445c)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:29 +02:00
Alex Converse
c613a89143 mxfdec: Include FF_INPUT_BUFFER_PADDING_SIZE when allocating extradata.
This prevents out of bounds reads when extradata is being decoded.
(cherry picked from commit 1f6f58d5855288492fc2640a9f1035c01c75d356)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:29 +02:00
Ronald S. Bultje
b3b97559bb vp3/theora: flush after seek.
(cherry picked from commit 8dcf5184307f072d55fb29373be05ef8b0fd02df)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:29 +02:00
Diego Biurrun
44c718cf71 rv30: return AVERROR(EINVAL) instead of EINVAL
On some platforms EINVAL could be positive, ensure we return negative values.
(cherry picked from commit e5985185d2eda942333ebbb72bd7d043ffe40be7)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:29 +02:00
Mans Rullgard
99ec59adbd Fix incorrect max_lowres values
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit e23a05ab0605693aa715b95120bc0132079ded06)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:29 +02:00
Rafaël Carré
3ed12b97be Do not decode RV30 files if the extradata is too small
Signed-off-by: Diego Biurrun <diego@biurrun.de>
(cherry picked from commit 289c60001fb0a9a1d7a97c876d8a42b84c6874ac)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:29 +02:00
Mans Rullgard
f7831bb104 aacps: skip some memcpy() if src and dst would be equal
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit e5902d60ce8f7cf10b6e87a57eec536b316261a3)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:29 +02:00
Anton Khirnov
9c2a024660 lavf: fix segfault in av_open_input_stream()
ic is NULL in case of error.
(cherry picked from commit 13551ad1e336573e3732fdeaf25607c47244bb80)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:29 +02:00
Oskar Arvidsson
f8521560fa pix_fmt: Fix number of bits per component in yuv444p9be
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit e59d6b4d7255d6d3dc89580f534e18af1433fe25)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:29 +02:00
Jindrich Makovicka
b772a757dd mpegts: fix Continuity Counter error detection
According to MPEG-TS specs, the continuity_counter shall not be
incremented when the adaptation_field_control of the packet
equals '00' or '10'.

Signed-off-by: Jindrich Makovicka <jindrich.makovicka@nangu.tv>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit 8923cfa328e8eb565aebcfe8672b276fd1c19bf7)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:29 +02:00
Justin Ruggles
0c039db4d8 alsa: limit buffer_size to 32768 frames.
In testing, the file output plugin gave a max buffer size of about 20 million
frames, which is way more than what is really needed and causes a memory
allocation error on my system.
(cherry picked from commit e35c674d13a7f180412cfe058530a2e7f1d49a90)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:29 +02:00
Justin Ruggles
6ed533f561 alsa: fallback to buffer_size/4 for period_size.
buffer_size/4 is the value used by aplay. This fixes output to null
devices, e.g. writing ALSA output to a file.
(cherry picked from commit 8bfd7f6a475225a0595bf657f8b99a8fffb461e4)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:28 +02:00
Tomas Härdin
c75ba07f6e gxf: Fix 25 fps DV material in GXF being misdetected as 50 fps
Set DV packet durations using fields_per_frame.
This requires turning gxf_stream_info into the demuxer's context for access to the value in gxf_packet().
Since MPEG-2 seems to work fine this done only for DV.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit 99fecc64b064a013559d3d61f7d9790e3c95c80e)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:28 +02:00
Anton Khirnov
9417761474 Revert "ffmpeg: get rid of useless AVInputStream.nb_streams."
This reverts commit 2cf8355f98681bdd726b739008acd5483f82f8d7.
AVInputStream.nb_streams tracks number of streams found at the
beginning, new streams may appear that ffmpeg doesn't know about. Fixes
crash in this case.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:28 +02:00
Alex Converse
6107543d4e adts: Fix PCE copying.
Parse the extension flag bit when reading the MPEG4 AudioSpecificConfig.

This has nothing to do with SBR/PS contradictory to what was noted when it was removed.
(cherry picked from commit 7f01a4192cdf4565eadee457f76e6b5196e35e0b)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:28 +02:00
Ronald S. Bultje
e9520db07e eval: fix memleak.
(cherry picked from commit fe277b16f0861a327e1f6c00c0dbb8b00806d60d)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:28 +02:00
Mans Rullgard
15355f9af2 ARM: workaround for bug in GNU assembler
Some versions of the GNU assembler do not handle 64-bit
immediate operands containing arithmetic.  Writing the
value out in full works correctly.

Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit fce1e43410bdc032c4cf2b1c66166a9ed99cc8f1)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:28 +02:00
Clément Bœsch
776603b650 mxfenc: fix ignored drop flag in binary timecode representation.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 4d5e7ab5c48451404038706ef3113c9925a83087)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:28 +02:00
John Stebbins
0631896885 dca: set AVCodecContext frame_size for DTS audio
Set the frame size when decoding DTS audio.

This has the side effect of fixing the computation of timestamps for DTS-HD in compute_pkt_fields.  Since frame_size is
not currently set, the duration of a frame is being guessed based on the streams bitrate.  But for DTS-HD, the bitrate
currently used is the rate of the DTS core which is much different than the whole DTS-HD stream and leads to a wildly
inaccurate frame duration estimate.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 49c7006c7e815d4330247624a9e6ba30e288cd02)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:28 +02:00
Jason Garrett-Glaser
8ad1f0852b H.264: fix overreads of qscale_table
filter_mb_fast assumed that qscale_table was padded like many of the other tables.
(cherry picked from commit 5029a406334ad0eaf92130e23d596e405a8a5aa0)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:28 +02:00
Ronald S. Bultje
47be9f5bd5 swscale: don't use planar output functions to write to NV12/21.
This prevents a crash when converting to NV12/21 without the bitexact
flags enabled.
(cherry picked from commit 0d994b2f45c08794899057ee7ca54f48218c0a53)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-26 19:26:28 +02:00
Michael Niedermayer
1450d6e637 Update version numbers for 0.7.5
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
n0.7.5
2011-09-22 02:30:14 +02:00
Michael Niedermayer
b00fc80d40 update version numbers for 0.8.4
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
n0.8.4
2011-09-22 02:29:11 +02:00
Michael Niedermayer
a99a35c8ea Merge branch 'release/0.8' into release/0.7
* release/0.8: (154 commits)
  vp6: partially propagate huffman tree building errors during coeff model parsing and fix misspelling
  Check for huffman tree building error in vp6 decoder.
  Release old pictures after a resolution change in vp5/6 decoder
  Check for missing reference in vp5/6 decoder.
  Check for invalid slices offsets in RV30/40 decoder.
  Check output buffer size in nellymoser decoder.
  Hack around gcc 4.6 breaking asm using call.
  Fix dxva2 decoding for some H264 samples.
  mp3demux: pass on error code on packet read.
  Check for invalid slice offsets in real decoder.
  rmdec: Reject invalid deinterleaving parameters
  Use deinterleavers for demangling audio packets in RealMedia.
  rv10: Reject slices that does not have the same type as the first one
  rmdec: use the deinterleaving mode and not the codec when creating audio packets.
  MAINTAINERS: add my GPG fingerprint. (cherry picked from commit 7882dc10f871bf25a848fe62a152f63814f9c7d1)
  Support 3IVD in isom, produced by 3ivx DivX Doctor.
  mpegpsdec: fix reading first mpegps packet (cherry picked from commit b2f230e23dd61112ac090b0c059d87b5f6bcb307)
  Avoid NULL dereference on corrupted bitstream with real decoder.
  Reject slices that does not have the same type than the first one in RV10/RV20 decoder.
  check all svq3_get_ue_golomb() returns.
  ...

Conflicts:
	Doxyfile
	RELEASE
	VERSION
	libavcodec/rv34.c
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-22 01:48:45 +02:00
Dustin Brody
056e9efc8e vp6: partially propagate huffman tree building errors during coeff model parsing and fix misspelling
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit f913eeea43078b3b9052efd8d8d29e7b29b39208)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-22 01:22:21 +02:00
Laurent Aimar
cf43508eb3 Check for huffman tree building error in vp6 decoder.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 7c249d4fbaf4431b20a90a3c942f3370c0039d9e)
2011-09-22 01:19:27 +02:00
Laurent Aimar
c9c6e5f4e8 Release old pictures after a resolution change in vp5/6 decoder
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit dba20b84784a7931b7eac50ced1d43e86801bde9)
2011-09-22 01:19:21 +02:00
Laurent Aimar
a5a02ea3f2 Check for missing reference in vp5/6 decoder.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 6a0e78929aa7d6b2c6b598c1589fb0e48fccb132)
2011-09-22 01:19:15 +02:00
Laurent Aimar
69b6248327 Check for invalid slices offsets in RV30/40 decoder.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit b64269ce5528bdbec8af671042f97af1242cf044)
2011-09-22 01:19:07 +02:00
Laurent Aimar
533dbaa55b Check output buffer size in nellymoser decoder.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 741ec30bd2385f794efa9fafa84d39a917f2574e)
2011-09-22 01:19:01 +02:00
Michael Niedermayer
ec7f0b527c Merge remote-tracking branch 'khirnov/release/0.7' into release/0.8
* khirnov/release/0.7: (64 commits)
  rv34: Check for invalid slice offsets
  rv34: Fix potential overreads
  rv34: Avoid NULL dereference on corrupted bitstream
  rv10: Reject slices that does not have the same type as the first one
  lavf: Fix context pointer in av_open_input_stream when avformat_open_input fails
  oggdec: fix out of bound write in the ogg demuxer
  Fixed size given to init_get_bits().
  smacker: fix a few off by 1 errors
  Check for invalid VLC value in smacker decoder.
  Check and propagate errors when VLC trees cannot be built in smacker decoder.
  Fixed off by one packet size allocation in the smacker demuxer.
  Check for invalid packet size in the smacker demuxer.
  ape demuxer: fix segfault on memory allocation failure.
  xan: Add some buffer checks (cherry picked from commit 0872bb23b4bd2d94a8ba91070f706d1bc1c3ced8)
  Fixed size given to init_get_bits() in xan decoder. (cherry picked from commit 393d5031c6aaaf8c2dda4eb5d676974c349fae85)
  smacker demuxer: handle possible av_realloc() failure.
  Fixed segfault with wavpack decoder on corrupted decorrelation terms sub-blocks.
  cljr: init_get_bits size in bits instead of bytes (cherry picked from commit 0c1f5b93d9b97c4cc3684ba91a040e90bfc760d2)
  indeo2: fail if input buffer too small (cherry picked from commit b7ce4f1d1c3add86ece7ca595ea6c4a10b471055)
  indeo2: init_get_bits size in bits instead of bytes (cherry picked from commit 68ca330cbd479111db9cb7649d7530ad59f04cc8)
  ...

Conflicts:
	ffmpeg.c
	libavdevice/alsa-audio.h
	libavformat/gxf.c
	libswscale/x86/swscale_template.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-22 01:10:24 +02:00
Reimar Döffinger
a582b028a4 Hack around gcc 4.6 breaking asm using call.
gcc 4.6 no longer decrements esp to account for local variables.
Thus using call will end up overwriting some local variable.
So add an extra one it can safely clobber.
This is a huge hack because it's basically pure chance it works,
no idea how this is supposed to be done.

Fixes trac ticket #397.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
(cherry picked from commit c928e9172928f3cddab949b107dd53b6bf79555e)
2011-09-21 23:50:09 +02:00
Reimar Döffinger
f36cea2673 Hack around gcc 4.6 breaking asm using call.
gcc 4.6 no longer decrements esp to account for local variables.
Thus using call will end up overwriting some local variable.
So add an extra one it can safely clobber.
This is a huge hack because it's basically pure chance it works,
no idea how this is supposed to be done.

Fixes trac ticket #397.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
(cherry picked from commit c928e9172928f3cddab949b107dd53b6bf79555e)
2011-09-21 23:50:05 +02:00
Carl Eugen Hoyos
5d833dd299 Fix dxva2 decoding for some H264 samples.
(cherry picked from commit bf7dc6b29d785f149f18c39db021413e08735546)
2011-09-21 23:48:41 +02:00
Carl Eugen Hoyos
bf7dc6b29d Fix dxva2 decoding for some H264 samples. 2011-09-21 23:47:34 +02:00
Michael Niedermayer
596762f058 mp3demux: pass on error code on packet read.
Reported-by: Tanami, Ohad
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit c83442b0571370b946d3f8bb85c46879d62ab10a)
2011-09-21 21:04:51 +02:00
Laurent Aimar
d2c5904cab Check for invalid slice offsets in real decoder.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 8716c178ddabe28a01a9fe81fff68d117b779333)
2011-09-21 21:04:51 +02:00
Laurent Aimar
3899b3be0c rmdec: Reject invalid deinterleaving parameters
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-09-21 21:04:51 +02:00
Kostya Shishkov
5163de0873 Use deinterleavers for demangling audio packets in RealMedia.
Unlike other containers RealMedia stores its audio packets in scrambled form,
with interleaver ID preceeding audio codec ID. Currently deinterleaving
decision is tied to the codec while it's possible to have non-default
deinterleaver with audio codec (like Int0 deinterleaver instead of specific
one for Sipro).

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-21 21:04:51 +02:00
Laurent Aimar
738c17b3a6 rv10: Reject slices that does not have the same type as the first one
This prevents crashes with some corrupted bitstreams.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-09-21 21:03:11 +02:00
Laurent Aimar
27128d82fa rmdec: use the deinterleaving mode and not the codec when creating audio packets.
It prevents crashes due to non initialized fields.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit 3e033da84782e12ed529e6a88dd53b6a72199e8e)
2011-09-21 20:56:53 +02:00
Gwenole Beauchesne
ed288c0edd MAINTAINERS: add my GPG fingerprint.
(cherry picked from commit 7882dc10f871bf25a848fe62a152f63814f9c7d1)
2011-09-21 20:56:53 +02:00
Carl Eugen Hoyos
9442f50c33 Support 3IVD in isom, produced by 3ivx DivX Doctor.
Fixes ticket #486.
(cherry picked from commit 4a9b069b6742f78ed7511d2a87af621ab1d43a59)
2011-09-21 20:56:53 +02:00
Arne de Bruijn
89bd2307f5 mpegpsdec: fix reading first mpegps packet
(cherry picked from commit b2f230e23dd61112ac090b0c059d87b5f6bcb307)
2011-09-21 20:56:53 +02:00