ffmpeg.git
5 years agoatrac3dec: Check coding mode against channels.
Michael Niedermayer [Fri, 9 Nov 2012 12:26:20 +0000 (13:26 +0100)]
atrac3dec: Check coding mode against channels.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 13451f5520ce6b0afde861b2285dda659f8d4fb4)

Conflicts:

libavcodec/atrac3.c

5 years agoalsdec: check block length
Michael Niedermayer [Wed, 12 Dec 2012 11:28:45 +0000 (12:28 +0100)]
alsdec: check block length

Fix writing over the end

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 0ceca269b66ec12a23bf0907bd2c220513cdbf16)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoadpcm: fix off by 1 error and out of array access in DK4
Michael Niedermayer [Wed, 12 Dec 2012 16:14:32 +0000 (17:14 +0100)]
adpcm: fix off by 1 error and out of array access in DK4

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit f18c873ab5ee3c78d00fdcc2582b39c133faecb4)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agohuffyuvdec: Skip len==0 cases
Michael Niedermayer [Tue, 29 Jan 2013 18:22:33 +0000 (19:22 +0100)]
huffyuvdec: Skip len==0 cases

Fixes vlc decoding for hypothetical files that would contain such cases.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 0dfc01c2bbf4b71bb56201bc4a393321e15d1b31)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agohuffyuvdec: Check init_vlc() return codes.
Michael Niedermayer [Tue, 29 Jan 2013 17:29:41 +0000 (18:29 +0100)]
huffyuvdec: Check init_vlc() return codes.

Prevents out of array writes

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit f67a0d115254461649470452058fa3c28c0df294)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agortmp: fix buffer overflows in ff_amf_tag_contents()
Xi Wang [Wed, 23 Jan 2013 02:40:05 +0000 (21:40 -0500)]
rtmp: fix buffer overflows in ff_amf_tag_contents()

A negative `size' will bypass FFMIN().  In the subsequent memcpy() call,
`size' will be considered as a large positive value, leading to a buffer
overflow.

Change the type of `size' to unsigned int to avoid buffer overflow, and
simplify overflow checks accordingly.

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 4e692374f7962ea358c329de38c380103f8991b6)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agortmp: fix multiple broken overflow checks
Xi Wang [Tue, 22 Jan 2013 22:49:29 +0000 (17:49 -0500)]
rtmp: fix multiple broken overflow checks

Sanity checks like `data + size >= data_end || data + size < data' are
broken, because `data + size < data' assumes pointer overflow, which is
undefined behavior in C.  Many compilers such as gcc/clang optimize such
checks away.

Use `size < 0 || size >= data_end - data' instead.

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 902cfe2f74d777a7dc20ac68f2393b9f84b790c1)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agortpenc: fix overflow checking in avc_mp4_find_startcode()
Xi Wang [Wed, 23 Jan 2013 01:58:07 +0000 (20:58 -0500)]
rtpenc: fix overflow checking in avc_mp4_find_startcode()

The check `start + res < start' is broken since pointer overflow is
undefined behavior in C.  Many compilers such as gcc/clang optimize
away this check.

Use `res > end - start' instead.  Also change `res' to unsigned int
to avoid signed left-shift overflow.

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 2f014567cfd63e58156f60666f1a61ba147276ab)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agosanm: check image dimensions before using them
Michael Niedermayer [Tue, 22 Jan 2013 20:30:20 +0000 (21:30 +0100)]
sanm: check image dimensions before using them

Avoids integer overflows and out of array accesses.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 49b729d3af8464de431362e6c5b3027102bc2f88)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agolavf/mov: skip version and flags attributes in mov_read_chan function
Matthieu Bouron [Mon, 4 Feb 2013 21:06:11 +0000 (22:06 +0100)]
lavf/mov: skip version and flags attributes in mov_read_chan function

Fixes ticket #1764.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 59d40fc7e66e6ebb2d89e25115492bfe13b07d95)

5 years agoffmpeg: dont allow -flags to override -pass
Michael Niedermayer [Wed, 6 Feb 2013 00:25:52 +0000 (01:25 +0100)]
ffmpeg: dont allow -flags to override -pass

Fixes Ticket2154

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit ccf9dd00da055e94117b56cead4af80ff331b00e)

5 years agodvenc: dont fail hard if the timecode is invalid
Michael Niedermayer [Tue, 5 Feb 2013 21:57:35 +0000 (22:57 +0100)]
dvenc: dont fail hard if the timecode is invalid

Instead just dont store the timecode
Fixes Ticket2187

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit f0eacbc760c8b27c2064cea5395e32971853c73c)

5 years agomovtextenc: fix pointer messup and out of array accesses
Michael Niedermayer [Tue, 5 Feb 2013 20:54:02 +0000 (21:54 +0100)]
movtextenc: fix pointer messup and out of array accesses

Fixes Ticket2213

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit b0635e2fcf80717dd618ef75d3317d62ed85c300)

5 years agoDo not change codec in flv streams if the user has forced a codec.
Carl Eugen Hoyos [Fri, 1 Feb 2013 22:27:15 +0000 (23:27 +0100)]
Do not change codec in flv streams if the user has forced a codec.

Fixes ticket #2218.
(cherry picked from commit 6a50e8a190bc1329fd3e76e8497bb7f870b6e69b)

5 years agodoc/muxers.texi: Fix mp3 picture attachment documentation.
Carl Eugen Hoyos [Fri, 1 Feb 2013 16:54:48 +0000 (17:54 +0100)]
doc/muxers.texi: Fix mp3 picture attachment documentation.
(cherry picked from commit 99eedfc40086972987aa27df8b1259c8bf15b20c)

5 years agowtvdec: demux thumbnail picture to AVStream.attached_pic
Peter Ross [Sun, 6 Jan 2013 03:15:24 +0000 (14:15 +1100)]
wtvdec: demux thumbnail picture to AVStream.attached_pic

Fixes ticket #2133.

(cherry picked from commit 508836932fcbc3c109fcc4df7a2f2b0bf21bbece)

5 years agomatroskaenc: add codec_tag lists back.
Carl Eugen Hoyos [Thu, 24 Jan 2013 01:30:40 +0000 (02:30 +0100)]
matroskaenc: add codec_tag lists back.

This reverts 312645e :
"Do not set codec_tag property for matroska muxers."

Also adds dummy codec_tag lists with codecs
supported in mkv but not in wav / avi.

Fixes ticket #2169.
(cherry picked from commit df39c3ce385c02cbd8046298578ea7454c0a0f81)

5 years agoUpdate for 1.0.3 n1.0.3
Michael Niedermayer [Mon, 21 Jan 2013 22:27:18 +0000 (23:27 +0100)]
Update for 1.0.3

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoh264: fix use of uninitialized variable
Michael Niedermayer [Sun, 20 Jan 2013 18:50:33 +0000 (19:50 +0100)]
h264: fix use of uninitialized variable

Fixed CID968588

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit fc86f88b32a288b252a088ee3c77b4f6219d54d5)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoh264: print mismatching opcode details in check_opcodes()
Michael Niedermayer [Sun, 20 Jan 2013 19:01:39 +0000 (20:01 +0100)]
h264: print mismatching opcode details in check_opcodes()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit dcbe15813ed09cf491e75a21cce0e751f5bc2b34)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoh264/ff_generate_sliding_window_mmcos: fix use of uninitialized variable
Michael Niedermayer [Sun, 20 Jan 2013 19:02:35 +0000 (20:02 +0100)]
h264/ff_generate_sliding_window_mmcos: fix use of uninitialized variable

Fixes CID968587
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 3fba3e79a3e46d7611817f9051b33885eb1ff962)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavf_showwaves: fix null pointer dereference
Michael Niedermayer [Mon, 21 Jan 2013 22:00:20 +0000 (23:00 +0100)]
avf_showwaves: fix null pointer dereference

Found-by: durandal_1707
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit e4eebc2da9da886e1bdf87d29e9a4c5b55111036)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoh264: fix ff_generate_sliding_window_mmcos() prototype.
Anton Khirnov [Mon, 14 Jan 2013 19:07:53 +0000 (20:07 +0100)]
h264: fix ff_generate_sliding_window_mmcos() prototype.

It's been returning an error value since
bad446e251405dc250c3cbee199072e083a1e4b9

Also check for the errors it returns.
(cherry picked from commit ea382767ad2191acbe97e90624059723e15f0e4b)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agortmpproto: Fix assignments in if() n1.0.2
Michael Niedermayer [Sun, 13 Jan 2013 23:07:51 +0000 (00:07 +0100)]
rtmpproto: Fix assignments in if()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit a601eb9543ecab09aa69a6673e553318daf7ea57)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agovsrc_testsrc: Fix assignments in if()
Michael Niedermayer [Sun, 13 Jan 2013 23:07:02 +0000 (00:07 +0100)]
vsrc_testsrc: Fix assignments in if()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 6f88d2d786b87cbfec5ea16d1cb570ad30c80399)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agotiff: Fix assignments in if()
Michael Niedermayer [Sun, 13 Jan 2013 23:06:44 +0000 (00:06 +0100)]
tiff: Fix assignments in if()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 659546b42d6550e67fcdbb4937cd1982c60448aa)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agora144enc: Fix assignments in if()
Michael Niedermayer [Sun, 13 Jan 2013 23:05:42 +0000 (00:05 +0100)]
ra144enc: Fix assignments in if()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit e2704381e5f13f54506f69b7a05a05dc27ce1d7d)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agonellymoserenc: Fix assignments in if()
Michael Niedermayer [Sun, 13 Jan 2013 23:05:30 +0000 (00:05 +0100)]
nellymoserenc: Fix assignments in if()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 795d2dc23b16a678d60a681e906aa87c14478597)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agolibvorbisenc: Fix assignments in if()
Michael Niedermayer [Sun, 13 Jan 2013 23:04:59 +0000 (00:04 +0100)]
libvorbisenc: Fix assignments in if()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit bdd71abe5f34ca37612e17d912060f4dc9b94796)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agolibvo-aacenc: Fix assignments in if()
Michael Niedermayer [Sun, 13 Jan 2013 23:04:41 +0000 (00:04 +0100)]
libvo-aacenc: Fix assignments in if()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 0ccb31dcad5a1543fbb284d66b0410b91ebd171d)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agolibspeexenc: Fix assignments in if()
Michael Niedermayer [Sun, 13 Jan 2013 23:04:25 +0000 (00:04 +0100)]
libspeexenc: Fix assignments in if()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 3b8d66d5317d91288751869206b3acbb84dc44c7)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agolibopencore-amr: Fix assignments in if()
Michael Niedermayer [Sun, 13 Jan 2013 23:04:13 +0000 (00:04 +0100)]
libopencore-amr: Fix assignments in if()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit d6180aa29741334cf69f691b27ffceb33f49d36a)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agolibmp3lame: Fix assignments in if()
Michael Niedermayer [Sun, 13 Jan 2013 23:03:38 +0000 (00:03 +0100)]
libmp3lame: Fix assignments in if()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 871b6ec01d27a74702b7cf1d61446709de037948)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agolibfdk-aacenc: Fix assignments in if()
Michael Niedermayer [Sun, 13 Jan 2013 23:03:23 +0000 (00:03 +0100)]
libfdk-aacenc: Fix assignments in if()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 9302ad1ac89d5443505cf0418f9d62786513032e)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agolibfaac: Fix assignments in if()
Michael Niedermayer [Sun, 13 Jan 2013 23:03:09 +0000 (00:03 +0100)]
libfaac: Fix assignments in if()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 68a25c64cda16e12ef3a051ff8661c71ef574683)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoaacenc: Fix assignments in if()
Michael Niedermayer [Sun, 13 Jan 2013 23:02:50 +0000 (00:02 +0100)]
aacenc: Fix assignments in if()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 98fed59427cec17ce55ac137e7e250cff7db81cf)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoupdate for FFmpeg 1.0.2
Michael Niedermayer [Sun, 20 Jan 2013 21:27:57 +0000 (22:27 +0100)]
update for FFmpeg 1.0.2

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agompeg1enc: Disable threads for resolutions too large for multi-threading
Michael Niedermayer [Sun, 20 Jan 2013 03:14:09 +0000 (04:14 +0100)]
mpeg1enc: Disable threads for resolutions too large for multi-threading

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 0c6b0409af070a3bfb02b55fde8ba18219edc76b)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agompeg12enc: check dimension validity
Michael Niedermayer [Mon, 7 Jan 2013 14:47:21 +0000 (15:47 +0100)]
mpeg12enc: check dimension validity

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 7fb87bc5f24b1be13269109506c05e4c54695b5e)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agompeg12enc: Correctly mask dimensions
Michael Niedermayer [Mon, 7 Jan 2013 14:31:58 +0000 (15:31 +0100)]
mpeg12enc: Correctly mask dimensions

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit bcc4ef1a415c2ae646fdc4a8e22ebe0205f270e6)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agompeg12: Support decoding dimensions that are a multiple of 4096
Michael Niedermayer [Mon, 7 Jan 2013 14:31:00 +0000 (15:31 +0100)]
mpeg12: Support decoding dimensions that are a multiple of 4096

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 878e5bd6f555ad6167abacb30d66e47aabcdd745)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoh264: add 3 pixels below for subpixel filter wait position.
Ronald S. Bultje [Tue, 15 Jan 2013 16:38:54 +0000 (08:38 -0800)]
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>
(cherry picked from commit 2c85d7c015489e169759e52c21499579dae5c2b1)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoh264: don't clobber mmco opcode tables for non-first slice headers.
Ronald S. Bultje [Mon, 14 Jan 2013 05:46:44 +0000 (21:46 -0800)]
h264: don't clobber mmco opcode tables for non-first slice headers.

Clobbering these tables will temporarily clobber the template used
as a basis for other threads to start decoding from. If the other
decoding thread updates from the template right at that moment,
subsequent threads will get invalid (or, usually, none at all) mmco
tables. This leads to invalid reference lists and subsequent decode
failures.

Therefore, instead, decode the mmco tables only for the first slice in
a field or frame. For other slices, decode the bits and ensure they
are identical to the mmco tables in the first slice, but don't ever
clobber the context state. This prevents other threads from using a
clobbered/invalid template as starting point for decoding, and thus
fixes decoding in these cases.

This fixes occasional (~1%) failures of h264-conformance-mr1_bt_a with
frame-multithreading enabled.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit f6badba1859fb266a9c0bdaf006a04c73873cd90)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoswr: fix handling of timestamps that cause multiple drops or silence injections
Michael Niedermayer [Sun, 13 Jan 2013 17:39:06 +0000 (18:39 +0100)]
swr: fix handling of timestamps that cause multiple drops or silence injections

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit d676598f879ba01ddb62f9abe8e17b2e94cb91cd)

5 years agoOnly skip MLP header in mpeg files if the codec actually is MLP.
Carl Eugen Hoyos [Thu, 17 Jan 2013 16:19:08 +0000 (17:19 +0100)]
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
(cherry picked from commit ad406f7e402977cb7dbc78ccb63e21c137f6699e)

5 years agoFix detection of struct v4l2_frmsize_discrete.
Carl Eugen Hoyos [Thu, 17 Jan 2013 01:11:12 +0000 (02:11 +0100)]
Fix detection of struct v4l2_frmsize_discrete.

It was always detected successfully.
(cherry picked from commit c345100efc9baae0ea7c9fcc376725cae5d3df6e)

5 years agoff_get_audio_frame_size: try to fix wma in wav
Michael Niedermayer [Sun, 6 Jan 2013 18:15:16 +0000 (19:15 +0100)]
ff_get_audio_frame_size: try to fix wma in wav

Fixes Ticket1905, Ticket2114

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 2713e43ac85245805db95048493dde121a20aee7)

5 years agoffmpeg: mark attachment streams finished.
Nicolas George [Tue, 1 Jan 2013 00:23:19 +0000 (01:23 +0100)]
ffmpeg: mark attachment streams finished.

Fix trac ticket #2083.
(cherry picked from commit 69a1667b064b11a2df4b4bdc136955f76d17f558)

5 years agotiffdec: Use the correct height field.
Piotr Bandurski [Sun, 6 Jan 2013 00:56:23 +0000 (01:56 +0100)]
tiffdec: Use the correct height field.

Fixes Ticket913

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 4784a135b2b0fe4d1b4c6256bd37265fc45aed3d)

5 years agolavf: Fix codec id forcing with probed codecs
Michael Niedermayer [Wed, 2 Jan 2013 00:15:58 +0000 (01:15 +0100)]
lavf: Fix codec id forcing with probed codecs

Fixes Ticket2088

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 341e40f1e1eeba1a2952c26363630596193e887b)

5 years agolavf: move force_codec_ids() up
Michael Niedermayer [Wed, 2 Jan 2013 00:15:06 +0000 (01:15 +0100)]
lavf: move force_codec_ids() up

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 3a6b6f425ee3f552eaaf6bde7480be5cb38aba1d)

5 years agolavc/ass_split: check for NULL pointer in ff_ass_split_override_codes().
Clément Bœsch [Sun, 30 Dec 2012 05:53:48 +0000 (06:53 +0100)]
lavc/ass_split: check for NULL pointer in ff_ass_split_override_codes().

This is consistent with the other ff_ass_split_* functions.

It also fixes a crash when trying to split a dialog with text=NULL
(which seems to happen when the text of the dialog is empty); basically,
this commit fixes crashes when trying to encode an empty text subtitle
dialog (see subrip and mov_text encoders).

Fixes Ticket2048.
(cherry picked from commit c83002a4f8042ccfa0688a9a18e8fa0369c1fda8)

5 years agomov: fix parsing of the chap atom.
Hendrik Leppkes [Sun, 15 Jul 2012 08:58:27 +0000 (10:58 +0200)]
mov: fix parsing of the chap atom.

This was broken in 0d96ec19ebc1577b27a889136364a906e1c627b1 under the
assumption that there is only one tref leaf atom.

Fixes Ticket #2081.
(cherry picked from commit 765158dd82a2e985f4eb0b201a8256964403f623)

5 years agolavc/movtextdec: keep the min size instead of max to fix overread.
Clément Bœsch [Tue, 1 Jan 2013 15:41:37 +0000 (16:41 +0100)]
lavc/movtextdec: keep the min size instead of max to fix overread.

Fixes Ticket #2087.
(cherry picked from commit 7d66bc7920240cc0e8df6c44b2d2cdbe4b228fbe)

5 years agomov: fix time types related to mov_metadata_creation_time
Michael Niedermayer [Wed, 17 Oct 2012 00:48:30 +0000 (02:48 +0200)]
mov: fix time types related to mov_metadata_creation_time

Fixes Ticket1817
Based on patch by: Przemyslaw Wesolek <przemyslaw.wesolek@go.art.pl>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit adbb75dbd8eabdaa7439633d26a79eb5b7387ef9)

5 years agompeg1video: fix regression with slices != threads
Michael Niedermayer [Wed, 12 Dec 2012 18:52:46 +0000 (19:52 +0100)]
mpeg1video: fix regression with slices != threads

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit a01679586cd9ac8470b81c0299fc7e13fd980d64)

5 years agompeg1video: support multi threaded slice encoding.
Michael Niedermayer [Wed, 12 Dec 2012 18:29:32 +0000 (19:29 +0100)]
mpeg1video: support multi threaded slice encoding.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 03df9720168335482f00898fc16b56ff4878d0e7)

Conflicts:
libavcodec/mpeg12enc.c

5 years agoflac_parser.c: fix issue with looping output for small files.
Michael Chinen [Sun, 14 Oct 2012 07:08:43 +0000 (16:08 +0900)]
flac_parser.c: fix issue with looping output for small files.

see trac 1345
https://ffmpeg.org/trac/ffmpeg/ticket/1345

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit c73b1a1d8010dac29653b41d39af9c18247179c3)

5 years agoffplay: Prevent 0/0 aspect from being passed on to lavfi
Michael Niedermayer [Sun, 14 Oct 2012 21:40:14 +0000 (23:40 +0200)]
ffplay: Prevent 0/0 aspect from being passed on to lavfi

0/0 fails to be parsed

Fixes Ticket1814
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit a63d7213b3eb96a35fdf34b05f45e5675107d8f9)

5 years agoasfdec: check stream_index for validity
Michael Niedermayer [Sat, 3 Nov 2012 04:58:12 +0000 (05:58 +0100)]
asfdec: check stream_index for validity

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit b7280cff9a7683395d7f899517b4aea8b52f12a4)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoasfdec: flip the interpretation of the header aspect back
Michael Niedermayer [Sat, 3 Nov 2012 04:39:19 +0000 (05:39 +0100)]
asfdec: flip the interpretation of the header aspect back

This reverts 2de88776892093b10522152f1f72b7dfc0320502

Fixes Ticket 1883

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit e5927910c2a156e9ad6388413400b620d1dcf035)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoasfdec: parse aspect ratio payload extension
Michael Niedermayer [Sat, 3 Nov 2012 04:38:12 +0000 (05:38 +0100)]
asfdec: parse aspect ratio payload extension

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 343c73e252d3e3c1e5d2037c2e8eb14b504f1e6f)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoasfdec: correctly parse payload extensions
Michael Niedermayer [Sat, 3 Nov 2012 04:37:18 +0000 (05:37 +0100)]
asfdec: correctly parse payload extensions

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 8c93269e420735f41363e75f8ee4c4e7b3ec49a7)

Conflicts:

libavformat/asfdec.c

5 years agoasfdec: parse payload extension list
Michael Niedermayer [Sat, 3 Nov 2012 04:35:35 +0000 (05:35 +0100)]
asfdec: parse payload extension list

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 2d8c76eb1f1c198e81c36a95c0d56e55cc1f4c5a)

Conflicts:

libavformat/asf.h

5 years agovqavideo: Reinitialise the actually used partial codebook bytestream-reader.
Carl Eugen Hoyos [Thu, 22 Nov 2012 21:28:17 +0000 (22:28 +0100)]
vqavideo: Reinitialise the actually used partial codebook bytestream-reader.

Fixes ticket #1942.
(cherry picked from commit dd6abc921af19100c4ace5ff72dee5f92c0e6ac0)

5 years agoavidec: try to support oddly muxed MMES stream
Michael Niedermayer [Thu, 22 Nov 2012 22:08:01 +0000 (23:08 +0100)]
avidec: try to support oddly muxed MMES stream

Fixes ticket1804

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit be89693ddc5a8cdeaf3edf48fb584d6adca54de0)

5 years agoriff: ignore ff_read_riff_info() failure.
Michael Niedermayer [Fri, 23 Nov 2012 22:35:16 +0000 (23:35 +0100)]
riff: ignore ff_read_riff_info() failure.

Some files simply contain invalid info tags.
Fixes unrelated bug posted into Ticket1821

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 09456d0df13404f004ab3a341d9ac21b7e5e6d6d)

5 years agoriff: retry reading metadata without padding if it fails with
Michael Niedermayer [Thu, 18 Oct 2012 02:58:20 +0000 (04:58 +0200)]
riff: retry reading metadata without padding if it fails with

Fixes Ticket1821

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit d0c27e88d2bb495d61bd32f41769f767a0c2a802)

5 years agoffserver: set oformat
Michael Niedermayer [Sun, 9 Dec 2012 22:34:32 +0000 (23:34 +0100)]
ffserver: set oformat

Fix Ticket1986

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit cbe43e62c9ac7d4aefdc13476f6f691bd626525f)

5 years agolavc: include os2threads.h in vp8.h if HAVE_OS2THREADS is enabled
KO Myung-Hun [Tue, 9 Oct 2012 10:29:32 +0000 (19:29 +0900)]
lavc: include os2threads.h in vp8.h if HAVE_OS2THREADS is enabled

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 3a45688abc5c98c91fc6a1b0b8b68f0eca641aec)

5 years agoh264: slice-mt: get last_pic_dropable from master context
Janne Grunau [Wed, 5 Dec 2012 18:56:36 +0000 (19:56 +0100)]
h264: slice-mt: get last_pic_dropable from master context

Fixes fate-h264-conformance-cvnlfi2_sony_h and smllwebdl.mkv from
https://github.com/OpenELEC/OpenELEC.tv/issues/1557 .
(cherry picked from commit 24c62ea7a5df44804be88150aa0c45e6796b5da9)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agolavf: compute probe buffer size more reliably.
Nicolas George [Tue, 4 Dec 2012 18:49:51 +0000 (19:49 +0100)]
lavf: compute probe buffer size more reliably.

The previous code computes the offset by reversing the growth
of the allocated buffer size: it is complex and did lead to
inconsistencies when the size limit is reached.

Fix trac ticket #1991.
(cherry picked from commit 03847eb8259291b4ff1bd840bd779d0699d71f96)

Conflicts:
libavformat/utils.c

5 years agoupdate for 1.0.1 n1.0.1
Michael Niedermayer [Mon, 3 Dec 2012 20:28:45 +0000 (21:28 +0100)]
update for 1.0.1

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoqdm2: check array index before use, fix out of array accesses
Michael Niedermayer [Fri, 30 Nov 2012 22:59:40 +0000 (23:59 +0100)]
qdm2: check array index before use, fix out of array accesses

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit a7ee6281f7ef1c29284e3a4cadfe0f227ffde1ed)

5 years agohuffyuvdec: check width more completely, avoid out of array accesses
Michael Niedermayer [Thu, 29 Nov 2012 14:56:05 +0000 (15:56 +0100)]
huffyuvdec: check width more completely, avoid out of array accesses

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 6abb9a901fca27da14d4fffbb01948288b5da3ba)

5 years agoroqvideodec: check dimensions validity
Michael Niedermayer [Thu, 29 Nov 2012 14:18:17 +0000 (15:18 +0100)]
roqvideodec: check dimensions validity

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 3ae610451170cd5a28b33950006ff0bd23036845)

5 years agoh264: correct ref count check and limit, fix out of array accesses.
Michael Niedermayer [Sun, 18 Nov 2012 15:29:04 +0000 (16:29 +0100)]
h264: correct ref count check and limit, fix out of array accesses.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit d6c184880ee2e09fd68c0ae217173832cee5afc1)

5 years agoeamad: fix out of array accesses
Michael Niedermayer [Sat, 17 Nov 2012 15:26:55 +0000 (16:26 +0100)]
eamad: fix out of array accesses

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 63ac64864c6e0e84355aa3caa5b92208997a9a8d)

5 years agopgssubdec: check RLE size before copying. Fix out of array accesses
Michael Niedermayer [Thu, 15 Nov 2012 15:41:28 +0000 (16:41 +0100)]
pgssubdec: check RLE size before copying. Fix out of array accesses

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit c0d68be555f5858703383040e04fcd6529777061)

5 years agowavpack: fix out of array access
Michael Niedermayer [Mon, 12 Nov 2012 13:42:45 +0000 (14:42 +0100)]
wavpack: fix out of array access

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit be818df547c3b0ae4fadb50fd210139a8636706a)

5 years agomjpegdec: check SE.
Michael Niedermayer [Sat, 10 Nov 2012 23:01:24 +0000 (00:01 +0100)]
mjpegdec: check SE.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoalac: fix integer overflow leading to subsequent out of array accesses.
Michael Niedermayer [Sat, 10 Nov 2012 16:41:56 +0000 (17:41 +0100)]
alac: fix integer overflow leading to subsequent out of array accesses.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 3920d1387834e2bc334aff9f518f4beb24e470bd)

5 years agoalac: fix nb_samples < order case
Michael Niedermayer [Sat, 10 Nov 2012 16:14:04 +0000 (17:14 +0100)]
alac: fix nb_samples < order case

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit fd4f4923cce6a2cbf4f48640b4ac706e614a1594)

5 years agoiff/ilbm: check remaining buffer size.
Michael Niedermayer [Fri, 9 Nov 2012 19:58:57 +0000 (20:58 +0100)]
iff/ilbm: check remaining buffer size.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 2fbb37b51bbea891392ad357baf8f3dff00bac05)

Conflicts:

libavcodec/iff.c

5 years agotiffdec: check count in metadata reading.
Michael Niedermayer [Fri, 9 Nov 2012 11:13:30 +0000 (12:13 +0100)]
tiffdec: check count in metadata reading.

Fixes out of array access

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 6d1c5ea04af3e345232aa70c944de961061dab2d)

5 years agoswr: use 64bit index/len for x86_64 mix
Michael Niedermayer [Sun, 28 Oct 2012 00:09:08 +0000 (02:09 +0200)]
swr: use 64bit index/len for x86_64 mix

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit d23e8f53ad01fde6d0dd96644c2a594f8dd7537e)

5 years agompegvideo enc: choose VBV buffer size for mpeg4 when none is specified instead of...
Michael Niedermayer [Tue, 23 Oct 2012 22:38:56 +0000 (00:38 +0200)]
mpegvideo enc: choose VBV buffer size for mpeg4 when none is specified instead of failing

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 3556e7ce737edade8c5e628a19e2b5da0809928d)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agompegvideo enc: choose VBV buffer size for mpeg1/2 when none is specified instead...
Michael Niedermayer [Tue, 23 Oct 2012 22:03:06 +0000 (00:03 +0200)]
mpegvideo enc: choose VBV buffer size for mpeg1/2 when none is specified instead of failing

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 1856162caa912a4a845b7caff51c9e2dff3d39d9)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoffv1: fix array data types
Michael Niedermayer [Mon, 8 Oct 2012 00:11:25 +0000 (02:11 +0200)]
ffv1: fix array data types

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 106790a4e92f40fedbe20631c693c95c7c8f3039)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agomovenc: fix regression with yuyv caused by c5f23d
Michael Niedermayer [Sat, 6 Oct 2012 18:19:05 +0000 (20:19 +0200)]
movenc: fix regression with yuyv caused by c5f23d

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit ac6659aff77b08a894967a2880eef13218baacb9)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agolibvorbisenc: fix afq delay setting
Michael Niedermayer [Sat, 6 Oct 2012 09:50:38 +0000 (11:50 +0200)]
libvorbisenc: fix afq delay setting

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 2c34367b4a17856584b3e8b64cefa1900342ebcd)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoaacenc: fix out of array writes
Michael Niedermayer [Thu, 4 Oct 2012 20:54:29 +0000 (22:54 +0200)]
aacenc: fix out of array writes

The value used in allocation is based on a estimate of the
maximum size of the spectral coefficients multiplied with 2
and rounded up. The exact or a tighter limit should be
found and used instead. But this issue shouldnt be left
open until someone works on that.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit d56834201bf7511ed497e956fb7ff78d49454b10)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoffserver: fix potential buffer overflow, based on wrong fscanf format indentifier.
Martin Ettl [Tue, 2 Oct 2012 20:57:25 +0000 (22:57 +0200)]
ffserver: fix potential buffer overflow, based on wrong fscanf format indentifier.

Fixed Ticket1780

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit f077e1fb4c912a66ab5d766fd256803821d92c67)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agofate: Fix --disable-zlib
jamal [Sat, 29 Sep 2012 03:41:32 +0000 (00:41 -0300)]
fate: Fix --disable-zlib

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 062cd9acc129b46256e73900e8e49701e4bb00fd)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agolavf: free probe data in case we close before probing finished
Michael Niedermayer [Sat, 29 Sep 2012 15:33:05 +0000 (17:33 +0200)]
lavf: free probe data in case we close before probing finished

Fixes Ticket1634

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 44a7a6300d104dd453bcd5c601e9c6944fb34679)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoffv1enc: fix integer overflow with high resolutions and lots of slices.
Michael Niedermayer [Sat, 29 Sep 2012 17:11:25 +0000 (19:11 +0200)]
ffv1enc: fix integer overflow with high resolutions and lots of slices.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit f049729e613ed3fb0abf767eb14423f545385c6e)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoconfigure: add missing dependancies for gpl tests
Michael Niedermayer [Fri, 28 Sep 2012 03:25:22 +0000 (05:25 +0200)]
configure: add missing dependancies for gpl tests

fixes fate without --enable-gpl

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 4fefe91a33956007f17cfd6e0c5ee1cb3a3f36d8)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agolavf/swfdec: fix flushing with compressed swf.
Clément Bœsch [Fri, 12 Oct 2012 16:23:46 +0000 (18:23 +0200)]
lavf/swfdec: fix flushing with compressed swf.

We now only return in the middle of the refill in case of read error, so
inflate can be re-called if zlib needs an empty (z.avail_in=0) inflate
call for flushing.

6 years agotests/Makefile: fix ffprobe test dependancy n1.0
Michael Niedermayer [Fri, 28 Sep 2012 00:58:35 +0000 (02:58 +0200)]
tests/Makefile: fix ffprobe test dependancy

This fixes the ffprobe tests under mingw/wine

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit a96e3a3e77bdcc9ac8692f1547d867ec58a57e49)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoasfenc: avoid negative timestamps
Michael Niedermayer [Fri, 28 Sep 2012 00:31:07 +0000 (02:31 +0200)]
asfenc: avoid negative timestamps

Fixes Ticket1606

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit b4c753487cf819213740d39c49b7bdc45338305d)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>