ffmpeg.git
5 years agoavformat: Fix apics with aac
Michael Niedermayer [Thu, 7 Mar 2013 12:55:43 +0000 (13:55 +0100)]
avformat: Fix apics with aac

Fixes Ticket2318

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

5 years agohls: fix timebase
Michael Niedermayer [Thu, 7 Mar 2013 12:42:12 +0000 (13:42 +0100)]
hls: fix timebase

Fixes Ticket1733

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

5 years agortmpproto: increase APP_MAX_LENGTH n1.0.5
Michael Niedermayer [Sat, 23 Feb 2013 16:24:15 +0000 (17:24 +0100)]
rtmpproto: increase APP_MAX_LENGTH

Fixes second part of Ticket2292

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoupdate for 1.0.5
Michael Niedermayer [Sun, 3 Mar 2013 23:01:57 +0000 (00:01 +0100)]
update for 1.0.5

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agortmpproto: Check APP_MAX_LENGTH
Michael Niedermayer [Sat, 23 Feb 2013 15:58:01 +0000 (16:58 +0100)]
rtmpproto: Check APP_MAX_LENGTH

Fixes Ticket2292

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoh264: check that luma and chroma depth match
Michael Niedermayer [Thu, 21 Feb 2013 14:00:59 +0000 (15:00 +0100)]
h264: check that luma and chroma depth match

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 bdeb61ccc67911cfc5e20c7cfb1312d0501ca90a)

Conflicts:

libavcodec/h264_ps.c

5 years agoavcodec_decode_audio4: check got_frame_ptr before handling initial skip
Michael Niedermayer [Thu, 21 Feb 2013 21:00:19 +0000 (22:00 +0100)]
avcodec_decode_audio4: check got_frame_ptr before handling initial skip

Fixes out of array accesses

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoswr: check channel layouts before using them.
Michael Niedermayer [Wed, 13 Feb 2013 16:49:16 +0000 (17:49 +0100)]
swr: check channel layouts before using them.

Fixes out of array accesses

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

Conflicts:

libswresample/swresample.c

5 years agoshorten: dont leave invalid channel counts in the context.
Michael Niedermayer [Wed, 13 Feb 2013 00:03:30 +0000 (01:03 +0100)]
shorten: dont leave invalid channel counts in the context.

Fixes freeing invalid addresses

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

Conflicts:

libavcodec/shorten.c

5 years agotiff: Check buffer allocation and pointer increment more carefully in shorts2str...
Michael Niedermayer [Tue, 12 Feb 2013 22:40:24 +0000 (23:40 +0100)]
tiff: Check buffer allocation and pointer increment more carefully in shorts2str() and double2str()

Fixes out of array accesses

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

Conflicts:

libavcodec/tiff.c

5 years agopngdec/filter: dont access out of array elements at the end
Michael Niedermayer [Tue, 12 Feb 2013 18:53:40 +0000 (19:53 +0100)]
pngdec/filter: dont access out of array elements at the end

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agosanm: Use the correct height variable in the decoded_size checks
Michael Niedermayer [Tue, 12 Feb 2013 01:03:28 +0000 (02:03 +0100)]
sanm: Use the correct height variable in the decoded_size checks

Fixes integer overflow 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 5260edee7e5bd975837696c8c8c1a80eb2fbd7c1)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agosanm: add forgotten check for decoded_size in old_codec37()
Michael Niedermayer [Tue, 12 Feb 2013 00:09:03 +0000 (01:09 +0100)]
sanm: add forgotten check for decoded_size in old_codec37()

Fixes out of array accesses

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoRequire at least three frames to autodetect loas.
Carl Eugen Hoyos [Sat, 2 Feb 2013 21:36:25 +0000 (22:36 +0100)]
Require at least three frames to autodetect loas.
(cherry picked from commit a60530e3ee1d9532c026a52b03661f88e163d647)

5 years agolavf/avio: check for : in filenames for protocols.
Nicolas George [Wed, 27 Feb 2013 18:19:15 +0000 (19:19 +0100)]
lavf/avio: check for : in filenames for protocols.

If the first "special" character in a filename is a comma,
it can introduce protocol options, but only if there is a
colon at the end. Otherwise, it is just a filename with a
comma.

Fix trac ticket #2303.
(cherry picked from commit d9fad53f4b447db1e436dcf3fc4a57e604616e6c)

5 years agolavc/bink: Chech for malloc failure
James Almer [Wed, 6 Feb 2013 01:34:29 +0000 (22:34 -0300)]
lavc/bink: Chech for malloc failure

Based on commit 8ab2173ed141aa2c3336be7f9880340dfb8dcf5e

5 years agolatmenc: Check for LOAS sync word
James Almer [Wed, 16 Jan 2013 21:27:14 +0000 (18:27 -0300)]
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>
(cherry picked from commit b454c64e0311d813fef9c22cf34f83c2ce77ab23)

5 years agodoc/APIchanges: List merge commit hashes and version numbers
Michael Niedermayer [Wed, 13 Feb 2013 02:32:23 +0000 (03:32 +0100)]
doc/APIchanges: List merge commit hashes and version numbers

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoapichanges: fix 2 wrong hashes
Michael Niedermayer [Thu, 14 Feb 2013 20:13:32 +0000 (21:13 +0100)]
apichanges: fix 2 wrong hashes

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoapichanges: Use , instead of / to seperate multiple hashes
Michael Niedermayer [Thu, 14 Feb 2013 19:34:10 +0000 (20:34 +0100)]
apichanges: Use , instead of / to seperate multiple hashes

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoapichanges: fix date
Michael Niedermayer [Thu, 14 Feb 2013 19:32:24 +0000 (20:32 +0100)]
apichanges: fix date

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agodoc/APIchanges: fix odd .01 versions
Michael Niedermayer [Thu, 14 Feb 2013 02:31:31 +0000 (03:31 +0100)]
doc/APIchanges: fix odd .01 versions

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoaac: reconfigure output on pop
Michael Niedermayer [Fri, 22 Feb 2013 16:33:22 +0000 (17:33 +0100)]
aac: reconfigure output on pop

Fixes Ticket1918

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoconfigure: Make warnings from -Wreturn-type fatal errors
Diego Biurrun [Mon, 14 Jan 2013 19:38:33 +0000 (20:38 +0100)]
configure: Make warnings from -Wreturn-type fatal errors

These warnings have no false positives and point to serious bugs.
(cherry picked from commit 99853cb8d4237b810b2fffb4a34f66fd0064ef72)

Conflicts:

configure

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agomovenc: hotfix, dont store fiel for h264 / mpeg4-asp / dnxhd
Michael Niedermayer [Thu, 14 Feb 2013 16:11:34 +0000 (17:11 +0100)]
movenc: hotfix, dont store fiel for h264 / mpeg4-asp / dnxhd

Other software does not store it in this case, and the information
is provided by the codec stream

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

Conflicts:

tests/ref/fate/vsynth1-mpeg4
tests/ref/fate/vsynth2-mpeg4
tests/ref/lavf/mov
tests/ref/seek/lavf_mov
tests/ref/vsynth/vsynth1-dnxhd-1080i
tests/ref/vsynth/vsynth2-dnxhd-1080i

5 years agoh264: Detect POC inconsistencies and try to handle them reasonably
Michael Niedermayer [Sat, 22 Dec 2012 17:02:48 +0000 (18:02 +0100)]
h264: Detect POC inconsistencies and try to handle them reasonably

Improves the file from Ticket2050

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoFix bits_per_coded_sample when encoding png with frame-level multithreading.
Carl Eugen Hoyos [Wed, 20 Feb 2013 21:54:21 +0000 (22:54 +0100)]
Fix bits_per_coded_sample when encoding png with frame-level multithreading.

Fixes ticket #2290.
(cherry picked from commit c4dc6c4c86a052b7ba53fa7ae0c1b0643ad70d0b)

Conflicts:
libavcodec/pngenc.c

5 years agoRevert "swfenc: use av_get_audio_frame_duration() instead of AVCodecContext.frame_size"
Carl Eugen Hoyos [Sun, 17 Feb 2013 18:56:09 +0000 (19:56 +0100)]
Revert "swfenc: use av_get_audio_frame_duration() instead of AVCodecContext.frame_size"

This reverts commit 620b88a302d522f71a6a95aff500cf7bd8520043.

Fixes ticket #2272.

Conflicts:
libavformat/swfenc.c
(cherry picked from commit 8d0757e1079f588ed69f629e2d1a4d5f232dc298)

5 years agoWrite the fiel atom to mov files independently of the used video coded.
Carl Eugen Hoyos [Thu, 14 Feb 2013 14:23:51 +0000 (15:23 +0100)]
Write the fiel atom to mov files independently of the used video coded.

The QuickTime specification does not contain any hint that the atom
must not be written in some cases and both the QuickTime and the
AVID decoders do not fail if the atom is present.

This change allows to signal (visually) interlaced streams with
a codec different from uncompressed video.

As a side-effect, this fixes ticket #2202
(cherry picked from commit 7d0e3b197c817b307d599a23704a44763ed0bbdd)

Conflicts:
tests/ref/fate/vsynth1-avui
tests/ref/fate/vsynth1-dnxhd-1080i
tests/ref/fate/vsynth1-mpeg4
tests/ref/fate/vsynth2-avui
tests/ref/fate/vsynth2-dnxhd-1080i
tests/ref/fate/vsynth2-mpeg4
tests/ref/lavf/mov
tests/ref/seek/lavf_mov

5 years agosws: dont write out of array on bigendian
Carl Eugen Hoyos [Thu, 14 Feb 2013 13:39:21 +0000 (14:39 +0100)]
sws: dont write out of array on bigendian

Fixes Ticket2229

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

5 years agoh264: Reset last_pocs in case of reference or frame number inconsistencies
Michael Niedermayer [Wed, 13 Feb 2013 21:36:07 +0000 (22:36 +0100)]
h264: Reset last_pocs in case of reference or frame number inconsistencies

This prevents faulty increasing of has_b_frames
Should fix Ticket 2062

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

5 years agoh264_refs: Print default in case we are missing a reference.
Michael Niedermayer [Sun, 11 Nov 2012 01:47:38 +0000 (02:47 +0100)]
h264_refs: Print default in case we are missing a reference.

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

5 years agoupdate for 1.0.4 n1.0.4
Michael Niedermayer [Thu, 7 Feb 2013 00:24:35 +0000 (01:24 +0100)]
update for 1.0.4

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoh264: Only apply error concealment if theres a frame
Michael Niedermayer [Sun, 20 Jan 2013 14:03:13 +0000 (15:03 +0100)]
h264: Only apply error concealment if theres a frame

Without any correctly decoded slices, there can be no frame.

Fixes out of array reads

Found-by: Rafaël Carré
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 60af6c3138dc501a647bc69b374d5d33d5d86ab5)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoaacdec: check channel count
Michael Niedermayer [Sun, 27 Jan 2013 19:37:27 +0000 (20:37 +0100)]
aacdec: check channel count

Prevent out of array accesses

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agovqavideo: check chunk sizes before reading chunks
Michael Niedermayer [Fri, 25 Jan 2013 05:11:59 +0000 (06:11 +0100)]
vqavideo: check chunk sizes before reading chunks

Fixes out of array writes

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agosanm: Check decoded_size.
Michael Niedermayer [Wed, 23 Jan 2013 23:27:10 +0000 (00:27 +0100)]
sanm: Check decoded_size.

This prevents a buffer overflow in rle_decode()

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec_decode_audio: do not trust the channel layout, use the channel count.
Michael Niedermayer [Fri, 18 Jan 2013 00:28:44 +0000 (01:28 +0100)]
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>
(cherry picked from commit d270c3202539e8364c46410e15f7570800e33343)

Conflicts:

libavcodec/utils.c

5 years agoerror_concealment: Check that the picture is not in a half setup state.
Michael Niedermayer [Fri, 11 Jan 2013 03:44:20 +0000 (04:44 +0100)]
error_concealment: Check that the picture is not in a half setup state.

Fixes state becoming inconsistent
Fixes a null pointer dereference

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
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)

6 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)

6 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

6 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)

6 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)

6 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>
6 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>