ffmpeg.git
5 years agoavcodec/utvideoenc: fix slice_bits size
Michael Niedermayer [Sat, 1 Mar 2014 01:40:19 +0000 (02:40 +0100)]
avcodec/utvideoenc: fix slice_bits size

Fixes assertion failure

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

Conflicts:

libavcodec/utvideoenc.c
(cherry picked from commit 57522ca79cc38c279123596d3288ddbf56fa8903)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/snow: split block clipping checks
Michael Niedermayer [Tue, 18 Feb 2014 01:53:14 +0000 (02:53 +0100)]
avcodec/snow: split block clipping checks

Fixes out of array read
Fixes: d4476f68ca1c1c57afbc45806f581963-asan_heap-oob_2266b27_8607_cov_4044577381_snow_chroma_bug.avi
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 61d59703c91869f4e5cdacd8d6be52f8b89d4ba4)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/ansi: fix integer overflow
Michael Niedermayer [Mon, 17 Feb 2014 19:49:42 +0000 (20:49 +0100)]
avcodec/ansi: fix integer overflow

Fixes out of array read
Fixes: 5f9698e86d92f19bb08d54ff0d57027f-signal_sigsegv_b30756_3795_cov_2693691257_ansi256.ans
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit d42ec8433c687fcbccefa51a7716d81920218e4f)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/msrle: use av_image_get_linesize() to calculate the linesize
Michael Niedermayer [Sun, 16 Feb 2014 22:08:52 +0000 (23:08 +0100)]
avcodec/msrle: use av_image_get_linesize() to calculate the linesize

Fixes out of array access
Fixes: 14a74a0a2dc67ede543f0e35d834fbbe-asan_heap-oob_49572c_556_cov_215466444_44_001_engine_room.mov
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit c919e1ca2ecfc47d796382973ba0e48b8f6f92a2)

Conflicts:

libavcodec/msrle.c
(cherry picked from commit bc1c8ec5e65098fd2ccd8456f667151dfc9cda42)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavformat/mpegtsenc: Check data array size in mpegts_write_pmt()
Michael Niedermayer [Thu, 13 Feb 2014 12:59:51 +0000 (13:59 +0100)]
avformat/mpegtsenc: Check data array size in mpegts_write_pmt()

Prevents out of array writes

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

Conflicts:

libavformat/mpegtsenc.c
(cherry picked from commit e87de3f50b765134588d0b048c32ed4b8acc16fb)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/wmalosslessdec: fix mclms_coeffs* array size
Michael Niedermayer [Fri, 7 Feb 2014 14:07:23 +0000 (15:07 +0100)]
avcodec/wmalosslessdec: fix mclms_coeffs* array size

Fixes corruption of context
Fixes: 8835659dde6a4f7dcdf341de6a45c6c8-signal_sigsegv_1dce67b_4564_cov_2504444599_classical_22_16_1_14000_v3c_0_extend_0_29.wma
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit ec9578d54d09b64bf112c2bf7a34b1ef3b93dbd3)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agosamplefmt: avoid integer overflow in av_samples_get_buffer_size()
Justin Ruggles [Thu, 30 Jan 2014 19:08:38 +0000 (14:08 -0500)]
samplefmt: avoid integer overflow in av_samples_get_buffer_size()

CC:libav-stable@libav.org
(cherry picked from commit 0e830094ad0dc251613a0aa3234d9c5c397e02e6)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/vc1: reset fcm/field_mode in non advanced header parsing
Michael Niedermayer [Sat, 1 Feb 2014 18:04:37 +0000 (19:04 +0100)]
avcodec/vc1: reset fcm/field_mode in non advanced header parsing

Fixes NULL pointer dereference
Fixes: signal_sigsegv_1ab8bf4_2847_cov_4254117347_SA10091.vc1
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit b51e9354772de446e8196dabf9aad1567b22f74d)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/takdec: always check bits_per_raw_sample
Michael Niedermayer [Fri, 31 Jan 2014 18:16:02 +0000 (19:16 +0100)]
avcodec/takdec: always check bits_per_raw_sample

Fixes out of array access
Fixes: asan_heap-oob_19c7a94_6470_cov_1453611734_luckynight-partial.tak
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit f58eab151214d2d35ff0973f2b3e51c5eb372da4)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/vmnc: Check that rectangles are within the picture
Michael Niedermayer [Mon, 20 Jan 2014 17:08:18 +0000 (18:08 +0100)]
avcodec/vmnc: Check  that rectangles are within the picture

Prevents out of array accesses with CODEC_FLAG_EMU_EDGE

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

Conflicts:

libavcodec/vmnc.c

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agodnxhdenc: fix mb_rc size
Michael Niedermayer [Fri, 17 Jan 2014 19:09:48 +0000 (20:09 +0100)]
dnxhdenc: fix mb_rc size

Fixes out of array access with RC_VARIANCE set to 0

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agopthread_frame: flush all threads on flush, not just the first one
Anton Khirnov [Thu, 27 Feb 2014 20:36:33 +0000 (21:36 +0100)]
pthread_frame: flush all threads on flush, not just the first one

avcodec_flush_buffers() must release all internally held references
according to its documentation, for which all the threads need to be
flushed.

Bug-Id: vlc/9665
(cherry picked from commit d1f9563d502037239185c11578cc614bdf0c5870)

Conflicts:
libavcodec/pthread_frame.c

5 years agortpdec_asf: Copy the need_parsing field from the chained demuxer
Martin Storsjö [Thu, 23 Jan 2014 12:07:46 +0000 (14:07 +0200)]
rtpdec_asf: Copy the need_parsing field from the chained demuxer

This fixes playback of mp3 streams in rtp/asf. This used to work
until 950482bf, but mostly by coincidence.

Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 2aec9e228cb317cca8cda9e03986c8482ea54404)

Fixes ticket #3223

5 years agoFix compilation on ARM with android gcc 4.7
Reimar Döffinger [Sat, 16 Mar 2013 12:36:20 +0000 (13:36 +0100)]
Fix compilation on ARM with android gcc 4.7

With the current code it fails due to running out
of registers.
So code the store offsets manually into the assembler
instead.
Passes "make fate-dts".

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
(cherry picked from commit 8067f55edf3719182aed6e5b57b7863889f80218)

Fixes ticket #2756.

5 years agoAllow decoding of slightly broken Nikon avi files.
Carl Eugen Hoyos [Mon, 20 Jan 2014 21:37:18 +0000 (22:37 +0100)]
Allow decoding of slightly broken Nikon avi files.

Fixes ticket #3330.
(cherry picked from commit f9c2d4d17e3b18becb046d71811f9e8aa5946cf9)

Conflicts:
libavformat/avidec.c

5 years agoavcodec/mjpegdec: Dont skip picture allocation if theres no picture allocated
Michael Niedermayer [Sun, 19 Jan 2014 15:44:58 +0000 (16:44 +0100)]
avcodec/mjpegdec: Dont skip picture allocation if theres no picture allocated

Fixes Ticket 3245
(cherry picked from commit ad8d063f230c05f8b5efbd05cc5a9f51a2549dcf)

5 years agoavcodec/mjpegdec: Dont treat the lack of a startcode differently from end of the...
Michael Niedermayer [Sun, 19 Jan 2014 03:02:11 +0000 (04:02 +0100)]
avcodec/mjpegdec: Dont treat the lack of a startcode differently from end of the bitstream

Fixes Ticket3303

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

Conflicts:
libavcodec/mjpegdec.c

5 years agoavcodec/aacdec: Dont fail if channels arent known yet
Michael Niedermayer [Sun, 19 Jan 2014 05:20:46 +0000 (06:20 +0100)]
avcodec/aacdec: Dont fail if channels arent known yet

Fixes Ticket3312

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

Conflicts:
libavcodec/aacdec.c

5 years agoavcodec/mjpegdec: only run EOI emulation code when there was a scan
Michael Niedermayer [Sun, 19 Jan 2014 03:56:13 +0000 (04:56 +0100)]
avcodec/mjpegdec: only run EOI emulation code when there was a scan

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

5 years agoavcodec/mjpegdec: update cur_scan also for non-LS jpeg
Michael Niedermayer [Sun, 19 Jan 2014 03:55:01 +0000 (04:55 +0100)]
avcodec/mjpegdec: update cur_scan also for non-LS jpeg

This should make no difference but the variable will be used in a subsequent commit

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

Conflicts:
libavcodec/mjpegdec.c

5 years agocmdutils: update year n1.2.5
Michael Niedermayer [Thu, 16 Jan 2014 01:53:32 +0000 (02:53 +0100)]
cmdutils: update year

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoUpdate for 1.2.5
Michael Niedermayer [Thu, 16 Jan 2014 01:52:53 +0000 (02:52 +0100)]
Update for 1.2.5

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agowmaprodec: Fix null pointer dereference in decode_frame()
Michael Niedermayer [Sat, 4 May 2013 14:49:47 +0000 (16:49 +0200)]
wmaprodec: Fix null pointer dereference in decode_frame()

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoh264: check mb_width/height
Michael Niedermayer [Sun, 5 May 2013 23:37:34 +0000 (01:37 +0200)]
h264: check mb_width/height

Fixes inconsistency that leads to out of array accesses with threads

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoh264: Always decode MMCOs into temprary array
Michael Niedermayer [Sat, 4 May 2013 18:21:47 +0000 (20:21 +0200)]
h264: Always decode MMCOs into temprary array

When decoding succeeded the array is copied into the permanent one.
This prevents inconsistencies
Fixes assertion failure

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoh264: move the default_ref_list_done check down after its inputs have been written
Michael Niedermayer [Sat, 30 Mar 2013 18:10:04 +0000 (19:10 +0100)]
h264: move the default_ref_list_done check down after its inputs have been written

Fixes out of array read

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoh264: Move slice_table clean out of frame_start
Michael Niedermayer [Sat, 30 Mar 2013 15:04:07 +0000 (16:04 +0100)]
h264: Move slice_table clean out of frame_start

Fixes inconsistency ultimately leading to an out of array read

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoh264_refs: Check for attempts to assign pictures to short & long.
Michael Niedermayer [Thu, 28 Mar 2013 20:09:01 +0000 (21:09 +0100)]
h264_refs: Check for attempts to assign pictures to short & long.

Fixes null pointer dereference

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoh264_cavlc: fix assertion failure due to reading too long vlc
Michael Niedermayer [Thu, 28 Mar 2013 02:16:01 +0000 (03:16 +0100)]
h264_cavlc: fix assertion failure due to reading too long vlc

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/aacps: fix number of bands used with ipd/opd
Michael Niedermayer [Thu, 2 Jan 2014 16:46:21 +0000 (17:46 +0100)]
avcodec/aacps: fix number of bands used with ipd/opd

Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7f861d16355f_1664_File1_fixed.aac
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 6433b393ba2b1b410ff18e386f84781a760549f5)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoaacps: correct opdipd code to match spec
Michael Niedermayer [Fri, 29 Mar 2013 19:58:42 +0000 (20:58 +0100)]
aacps: correct opdipd code to match spec

This fixes out of array reads

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/ansi: Fix right/bottom end checks
Michael Niedermayer [Thu, 2 May 2013 00:16:41 +0000 (02:16 +0200)]
avcodec/ansi: Fix right/bottom end checks

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/ansi: Check x/y
Michael Niedermayer [Thu, 2 May 2013 00:15:03 +0000 (02:15 +0200)]
avcodec/ansi: Check x/y

This prevents out of array accesses

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoshorten: fix "off by padding" bug
Michael Niedermayer [Wed, 22 May 2013 15:39:22 +0000 (17:39 +0200)]
shorten: fix "off by padding" bug

Fixes array overread

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/lcldec: Check that dimensions are a multiple of the subsample factors
Michael Niedermayer [Mon, 13 May 2013 16:09:04 +0000 (18:09 +0200)]
avcodec/lcldec: Check that dimensions are a multiple of the subsample factors

Other dimensions would not work correctly currently,
also ask for a sample for files that fail this check.

This fixes an integer overflow leading to out of array
accesses.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavformat/vqf: check number of channels before use.
Michael Niedermayer [Tue, 7 May 2013 20:26:22 +0000 (22:26 +0200)]
avformat/vqf: check number of channels before use.

Fixes division by zero

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agodxa: check vectors of 2x2 motion blocks
Michael Niedermayer [Tue, 7 May 2013 18:33:33 +0000 (20:33 +0200)]
dxa: check vectors of 2x2 motion blocks

Fixes out of array reads

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agodxa: check vectors of 4x4 motion blocks
Michael Niedermayer [Tue, 7 May 2013 18:18:41 +0000 (20:18 +0200)]
dxa: check vectors of 4x4 motion blocks

Fixes out of array reads

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoshorten: allocate space for padding
Michael Niedermayer [Tue, 7 May 2013 17:57:10 +0000 (19:57 +0200)]
shorten: allocate space for padding

Fixes array overread

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoevrcdec: fix sign error
Michael Niedermayer [Sat, 4 May 2013 00:47:58 +0000 (02:47 +0200)]
evrcdec: fix sign error

The specification wants round(abs(x))) * sign(x) which is
equivakent to round(x)

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoeamad: Check against minimum supported dimensions
Michael Niedermayer [Fri, 3 May 2013 21:16:54 +0000 (23:16 +0200)]
eamad: Check against minimum supported dimensions

Fixes out of array reads

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoxan: Check for overlapping copies
Michael Niedermayer [Wed, 17 Apr 2013 22:52:48 +0000 (00:52 +0200)]
xan: Check for overlapping copies

No valid samples i found use such copies

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/bitstream: check codes in ff_init_vlc_sparse()
Michael Niedermayer [Thu, 18 Apr 2013 00:52:41 +0000 (02:52 +0200)]
avcodec/bitstream: check codes in ff_init_vlc_sparse()

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/bitstream: Check bits in ff_init_vlc_sparse()
Michael Niedermayer [Thu, 18 Apr 2013 00:47:10 +0000 (02:47 +0200)]
avcodec/bitstream: Check bits in ff_init_vlc_sparse()

Fixes out of array reads

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/mpegvideo_motion: Use a field from the current frame if the last is unavailab...
Michael Niedermayer [Fri, 19 Apr 2013 12:46:31 +0000 (14:46 +0200)]
avcodec/mpegvideo_motion: Use a field from the current frame if the last is unavailable in DMV & 16x8

Fixes null pointer dereference

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/c93: Check for block overlap.
Michael Niedermayer [Tue, 16 Apr 2013 14:41:21 +0000 (16:41 +0200)]
avcodec/c93: Check for block overlap.

Fixes overlapping memcpy()

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/mpegvideo_motion: Check P field references
Michael Niedermayer [Thu, 18 Apr 2013 17:53:00 +0000 (19:53 +0200)]
avcodec/mpegvideo_motion: Check P field references

If a reference is unavailable use a field from the current
picture
Fixes null pointer dereference

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agosvq3: use memmove to avoid overlap in memcpy.
Michael Niedermayer [Thu, 18 Apr 2013 15:54:54 +0000 (17:54 +0200)]
svq3: use memmove to avoid overlap in memcpy.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoevrcdec: use memmove() instead of memcpy() when regions can overlap.
Michael Niedermayer [Thu, 18 Apr 2013 14:19:10 +0000 (16:19 +0200)]
evrcdec: use memmove() instead of memcpy() when regions can overlap.

This occurs also with valid files.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavutil/log: skip IO calls on empty strings
Michael Niedermayer [Fri, 6 Dec 2013 22:30:34 +0000 (23:30 +0100)]
avutil/log: skip IO calls on empty strings

These occur when no context is set for example, thus they are common

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/error_resilience: check that er is supported before attempting to read the...
Michael Niedermayer [Fri, 6 Dec 2013 15:49:35 +0000 (16:49 +0100)]
avcodec/error_resilience: check that er is supported before attempting to read the status of the previous slice

Fixes incorrectly set error_occured and improves speed

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/error_resilience: factor er_supported() check out
Michael Niedermayer [Fri, 6 Dec 2013 15:49:00 +0000 (16:49 +0100)]
avcodec/error_resilience: factor er_supported() check out

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/libopusenc: change default frame duration to 20 ms
Paul B Mahol [Fri, 15 Nov 2013 01:09:06 +0000 (01:09 +0000)]
avcodec/libopusenc: change default frame duration to 20 ms

20 ms is used by libopus encoder.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
(cherry picked from commit 74906d3727ec3bd9b7b28dfa7a98ff6e8cf8b6d7)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec: move end zeroing code from av_packet_split_side_data() to avcodec_decode_sub...
Michael Niedermayer [Thu, 21 Nov 2013 01:32:37 +0000 (02:32 +0100)]
avcodec: move end zeroing code from av_packet_split_side_data() to avcodec_decode_subtitle2()

This code changes the input packet, which is read only and can in
rare circumstances lead to decoder errors. (i run into one of these in
the audio decoder, which corrupted the packet during av_find_stream_info()
so that actual decoding that single packet failed later)
Until a better fix is implemented, this commit limits the problem.
A better fix might be to make the subtitle decoders not depend on
data[size] = 0 or to copy their input when this is not the case.
(cherry picked from commit 01923bab98506b1e98b4cbf08419364ce6ffea6d)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoh264: Do not treat the initial frame special in handling of frame gaps
Michael Niedermayer [Thu, 14 Nov 2013 10:27:45 +0000 (11:27 +0100)]
h264: Do not treat the initial frame special in handling of frame gaps

The not handling of frame gaps has lead to the lack of a dummy reference
frame, which has lead to the failure of decode_slice_header() which has
lead to one SEI recovery message being skiped which had introduced a
slightly suboptimal recovery point for at least 1 h264 file compared to
JM.

Found-by: Carl & BugMaster
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 9e5ef1c5c37208326c59d642e2dc7afd3f10b09b)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavformat/thp: force moving forward
Michael Niedermayer [Thu, 31 Oct 2013 01:26:07 +0000 (02:26 +0100)]
avformat/thp: force moving forward

Fixes infinite loop
Fixes Ticket3098

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavformat/thp: fix variable types to avoid overflows
Michael Niedermayer [Thu, 31 Oct 2013 01:19:40 +0000 (02:19 +0100)]
avformat/thp: fix variable types to avoid overflows

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/jpeglsdec: check err value for ls_get_code_runterm()
Michael Niedermayer [Wed, 30 Oct 2013 22:27:28 +0000 (23:27 +0100)]
avcodec/jpeglsdec: check err value for ls_get_code_runterm()

Fixes infinite loop
Fixes Ticket3086

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavutil/opt: initialize ret
Michael Niedermayer [Sun, 20 Oct 2013 16:38:48 +0000 (18:38 +0200)]
avutil/opt: initialize ret

Fixes CID1108610
Fixes use of uninitialized variable

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/utils: add some saftey checks to add_metadata_from_side_data()
Michael Niedermayer [Sat, 19 Oct 2013 15:52:47 +0000 (17:52 +0200)]
avcodec/utils: add some saftey checks to add_metadata_from_side_data()

This fixes potential overreads with crafted files.

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

Conflicts:

libavcodec/utils.c

5 years agoavcodec/avpacket/av_packet_split_side_data: ensure that side data padding is initialized
Michael Niedermayer [Sat, 19 Oct 2013 15:45:54 +0000 (17:45 +0200)]
avcodec/avpacket/av_packet_split_side_data: ensure that side data padding is initialized

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavfilter/ff_insert_pad: fix order of operations
Michael Niedermayer [Mon, 21 Oct 2013 14:21:14 +0000 (16:21 +0200)]
avfilter/ff_insert_pad: fix order of operations

Fixes out of bounds access
Fixes CID732170
Fixes CID732169

No filter is known to use this function in a way so the issue can be reproduced.

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

Conflicts:

libavfilter/avfilter.c
(cherry picked from commit 86591b244f3a27293153896813f5569b49b2f5c0)

Conflicts:

libavfilter/avfilter.c

5 years agoffserver: strip odd chars from html error messages before sending them back
Michael Niedermayer [Tue, 8 Oct 2013 22:30:46 +0000 (00:30 +0200)]
ffserver: strip odd chars from html error messages before sending them back

Fixes Ticket3034

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/ffv1dec: fix format detection
Paul B Mahol [Mon, 9 Sep 2013 10:44:27 +0000 (10:44 +0000)]
avcodec/ffv1dec: fix format detection

Fixes crash with carefuly designed files.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
(cherry picked from commit a27227d401adf12534dc7a26d72e43e2f35f8944)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoDo not read mkv audio bit_depth if bits_per_coded_sample is already set.
Carl Eugen Hoyos [Wed, 15 Jan 2014 22:37:47 +0000 (23:37 +0100)]
Do not read mkv audio bit_depth if bits_per_coded_sample is already set.

This allows decoding broken mkv files containing G.726 audio.
(cherry picked from commit 11329370770e5c982deece7d4eb4f2e95e725332)

5 years agoDo not set mkv bit_depth to av_get_bytes_per_sample() for G.726.
Carl Eugen Hoyos [Wed, 15 Jan 2014 22:35:22 +0000 (23:35 +0100)]
Do not set mkv bit_depth to av_get_bytes_per_sample() for G.726.

The value is wrong and leads to broken files.
(cherry picked from commit 565102dcac4959da60e6b1528dc31315d21194ca)

5 years agoavcodec/msvideo1enc: fix SKIPS_MAX
Michael Niedermayer [Thu, 9 Jan 2014 03:02:58 +0000 (04:02 +0100)]
avcodec/msvideo1enc: fix SKIPS_MAX

Fixes Ticket3270

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

5 years agoUse the h264 parser when decoding VSSH in avi.
Carl Eugen Hoyos [Tue, 7 Jan 2014 21:49:05 +0000 (22:49 +0100)]
Use the h264 parser when decoding VSSH in avi.

Fixes ticket #3261 visually.

Analyzed-by: Michael Doilnitsyn
(cherry picked from commit 94cf4f8bac12c58e30ce3b5d72cf5898baafe9a8)

Conflicts:
libavformat/avidec.c

5 years agoavformat/mxfdec: detect loops during header parsing
Michael Niedermayer [Wed, 8 Jan 2014 03:49:50 +0000 (04:49 +0100)]
avformat/mxfdec: detect loops during header parsing

The header parser uses forward and backward parsing, making the
bulletproof prevention of loops difficult, thus this simple
detection code.
If someone improves the forward/backward parsing so it cannot loop
then this commit should be reverted

Fixes Ticket3278

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

5 years agoavformat/oggdec: dont read timestamps from EOS pages of ogm videos
Michael Niedermayer [Sat, 4 Jan 2014 16:33:59 +0000 (17:33 +0100)]
avformat/oggdec: dont read timestamps from EOS pages of ogm videos

Some muxers store invalid timestamps there, which breaks seeking
Fixes Ticket2739

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

5 years agoconfigure: Special case libfreetype test
Alexander Strasser [Fri, 6 Dec 2013 16:20:26 +0000 (17:20 +0100)]
configure: Special case libfreetype test

Include the freetype header, in-directly through a macro, like it
is done in the drawtext filter. Do not break if the header is moved.

Unfortunately the drawtext filter included the file where the include
macros are defined in a wrong way. This is not needed and breaks the
build. Remove that #include line too.

(cherry picked from commit cea5812fa723c08b89d929eeba73462e05de2973)

Signed-off-by: Alexander Strasser <eclipse7@gmx.net>
Conflicts:
configure

5 years agonutenc/write_index: warn if 2 consecutive keyframes have the same PTS and discard...
Michael Niedermayer [Sun, 22 Dec 2013 17:47:28 +0000 (18:47 +0100)]
nutenc/write_index: warn if 2 consecutive keyframes have the same PTS and discard the 2nd

This fixes an assertion failure and regression and restores previous behaviour
Fixes Ticket3197

An alternative would be to fail hard in this case and refuse to mux such data.

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

5 years agowtvenc: populate VIDEOINFOHEADER2
Peter Ross [Mon, 23 Dec 2013 09:37:28 +0000 (20:37 +1100)]
wtvenc: populate VIDEOINFOHEADER2

Fixes ticket #2835.

Signed-off-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 6da21c1f8190d674fd1e5619bb148c1bbab8ca3c)

Conflicts:
tests/ref/lavf/wtv
tests/ref/seek/lavf-wtv

5 years agoavformat/riffenc: indent
Peter Ross [Mon, 23 Dec 2013 09:37:13 +0000 (20:37 +1100)]
avformat/riffenc: indent

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

Conflicts:
libavformat/riffenc.c

5 years agoriffenc: add option to ff_put_bmp_header to ignore extradata
Peter Ross [Mon, 23 Dec 2013 09:37:00 +0000 (20:37 +1100)]
riffenc: add option to ff_put_bmp_header to ignore extradata

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

Conflicts:
libavformat/riffenc.c

5 years agoarm: Don't clobber callee saved registers in scalarproduct
Martin Storsjö [Fri, 20 Dec 2013 13:02:35 +0000 (15:02 +0200)]
arm: Don't clobber callee saved registers in scalarproduct

q4-q7/d8-d15 are supposed to not be clobbered by the callee.

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit d307e408d4a9ada22df443cc38be77cc5e492694)

5 years agoswscale/utils: check chroma width for fast bilinear scaler
Michael Niedermayer [Sun, 15 Dec 2013 13:13:55 +0000 (14:13 +0100)]
swscale/utils: check chroma width for fast bilinear scaler

Fixes artifacts where fast bilinear was used for downscaling chroma

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

5 years agoswscale/utils: remove useless ()
Michael Niedermayer [Sun, 15 Dec 2013 13:10:02 +0000 (14:10 +0100)]
swscale/utils: remove useless ()

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

5 years agoavcodec/cabac: force get_cabac to be not inlined
Michael Niedermayer [Thu, 5 Dec 2013 00:41:10 +0000 (01:41 +0100)]
avcodec/cabac: force get_cabac to be not inlined

works around bug in gccs inline asm register assignment
Fixes Ticket3177

gcc from 4.4 to 4.6 is affected at least, no non affected gccs known
clang seems not affected

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

5 years agoffmpeg: Fix forcing of the framerate for stream copy on input
Michael Niedermayer [Tue, 2 Apr 2013 16:08:12 +0000 (18:08 +0200)]
ffmpeg: Fix forcing of the framerate for stream copy on input

Fixes Ticket2211

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

5 years agobuild: avoid stdin stall with GNU AS probing.
Clément Bœsch [Fri, 8 Nov 2013 22:55:06 +0000 (23:55 +0100)]
build: avoid stdin stall with GNU AS probing.

a758c5e added probing for various tools, such as AS. Unfortunately, GNU
AS is reading stdin with -v, and thus configure is stalled with
configure arguments such as --as=as.

Fixes Ticket #1898.
(cherry picked from commit dbb41f93c16cbc65a899a75723c95da51c851cd5)

5 years agoavformat/utils: dont count attached pics toward the probesize
Michael Niedermayer [Mon, 18 Nov 2013 02:02:36 +0000 (03:02 +0100)]
avformat/utils: dont count attached pics toward the probesize

Such pics behave more like headers which we also dont count.
Fixes Ticket3146

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

5 years agoavcodec/bink: fix seeking to frame 0
Michael Niedermayer [Wed, 30 Oct 2013 22:56:52 +0000 (23:56 +0100)]
avcodec/bink: fix seeking to frame 0

Fixes Ticket3088

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

Conflicts:
libavcodec/bink.c

5 years agoavformat/utils: do not override pts in h264 when they are provided from the demuxer
Michael Niedermayer [Sat, 26 Oct 2013 23:03:19 +0000 (01:03 +0200)]
avformat/utils: do not override pts in h264 when they are provided from the demuxer

Fixes Ticket2143

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

5 years agoh264: make flush_change() set mmco_reset
Michael Niedermayer [Fri, 25 Oct 2013 23:22:38 +0000 (01:22 +0200)]
h264: make flush_change() set mmco_reset

This ensures that frames do not get mixed on context reinits

Fixes Ticket2836

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

5 years agoavcodec/h264: reduce noisiness of "mmco: unref short failure"
Michael Niedermayer [Fri, 25 Oct 2013 18:03:29 +0000 (20:03 +0200)]
avcodec/h264: reduce noisiness of "mmco: unref short failure"

Do not consider it an error if we have no frames and should discard one.
This condition can easily happen when decoding is started from an I frame

Fixes Ticket2811

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

Conflicts:
libavcodec/h264_refs.c

5 years agoavformat/mp3dec: perform seek resync in the correct direction
Michael Niedermayer [Fri, 25 Oct 2013 17:35:55 +0000 (19:35 +0200)]
avformat/mp3dec: perform seek resync in the correct direction

Fixes seeking to the last frame in CBR files
Fixes Ticket2773

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

5 years agoavcodec/h264: do not trust last_pic_droppable when marking pictures as done
Michael Niedermayer [Thu, 24 Oct 2013 21:11:41 +0000 (23:11 +0200)]
avcodec/h264: do not trust last_pic_droppable when marking pictures as done

This simplifies the code and fixes a deadlock

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

Conflicts:
libavcodec/h264.c

5 years agoavcodec/h264_refs: modify key frame detection heuristic to detect more cases
Michael Niedermayer [Wed, 9 Oct 2013 21:52:54 +0000 (23:52 +0200)]
avcodec/h264_refs: modify key frame detection heuristic to detect more cases

Fixes Ticket2968

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

5 years agolavd/v4l2: do not fail when VIDIOC_ENUMSTD returns EINVAL without a valid match
mrlika [Mon, 2 Sep 2013 12:10:22 +0000 (15:10 +0300)]
lavd/v4l2: do not fail when VIDIOC_ENUMSTD returns EINVAL without a valid match

With some (buggy) drivers, the VIDIOC_G_STD ioctl returns a std_id that cannot
be matched with any of the enumerated v4l2_standard structures (for example
std_id = 0 or std_id = 0xffffff). Do not fail when we reach the end of the
enumeration without a valid match.

Fixes ticket #2370

Note: This commit message has been modified by Giorgio Vazzana, the original
commit message was:

"Fixed regression for mandatory VIDIOC_ENUMSTD support by v4l2"

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

5 years agoavformat/wavdec: Dont trust the fact chunk for PCM
Michael Niedermayer [Wed, 9 Oct 2013 19:43:06 +0000 (21:43 +0200)]
avformat/wavdec: Dont trust the fact chunk for PCM

Fixes Ticket3033

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

Conflicts:
libavformat/wavdec.c

5 years agoavformat/matroskadec: only set r_frame_rate if the value is within reasonable limits
Michael Niedermayer [Sat, 5 Oct 2013 22:07:28 +0000 (00:07 +0200)]
avformat/matroskadec: only set r_frame_rate if the value is within reasonable limits

Fixes Ticket2451

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

5 years agoavformat/mov: force parsing of headers if stts is absent
Michael Niedermayer [Fri, 4 Oct 2013 15:39:19 +0000 (17:39 +0200)]
avformat/mov: force parsing of headers if stts is absent

Fixes Ticket2991

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

6 years agoupdate for 1.2.4 n1.2.4
Michael Niedermayer [Wed, 2 Oct 2013 23:28:06 +0000 (01:28 +0200)]
update for 1.2.4

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoMerge remote-tracking branch 'TimothyGu/release/1.2' into release/1.2
Michael Niedermayer [Wed, 2 Oct 2013 23:18:14 +0000 (01:18 +0200)]
Merge remote-tracking branch 'TimothyGu/release/1.2' into release/1.2

* TimothyGu/release/1.2:
  doc/encoders: add doc for AAC encoder
  doc/encoders: improve libvo-aacenc doc
  doc/ffmpeg-formats: Add documentation for 3 parameters that have been missing
  doc/encoders: Remove options that were not there when branch was cut from master
  doc/encoders: reformat and add some clarification in libtwolame doc
  doc/encoders: reformat libmp3lame doc

Merged-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavcodec/parser: reset indexes on realloc failure
Michael Niedermayer [Thu, 26 Sep 2013 19:03:48 +0000 (21:03 +0200)]
avcodec/parser: reset indexes on realloc failure

Fixes Ticket2982

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavcodec/ffv1enc: update buffer check for 16bps
Michael Niedermayer [Mon, 9 Sep 2013 15:58:18 +0000 (17:58 +0200)]
avcodec/ffv1enc: update buffer check for 16bps

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavcodec/truemotion2: Fix av_freep arguments
Michael Niedermayer [Sun, 8 Sep 2013 18:27:54 +0000 (20:27 +0200)]
avcodec/truemotion2: Fix av_freep arguments

Fixes null pointer dereference
Fixes Ticket2944

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

Conflicts:

libavcodec/truemotion2.c

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavcodec/mjpegdec: Add some sanity checks to ljpeg_decode_rgb_scan()
Michael Niedermayer [Wed, 4 Sep 2013 22:36:44 +0000 (00:36 +0200)]
avcodec/mjpegdec: Add some sanity checks to ljpeg_decode_rgb_scan()

These prevent the rgb ljpeg code from being run on parameters that it doesnt
support. No testcase available but it seems possible to trigger these.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavfilter/vf_fps: make sure the fifo is not empty before using it
Michael Niedermayer [Mon, 2 Sep 2013 02:32:23 +0000 (04:32 +0200)]
avfilter/vf_fps: make sure the fifo is not empty before using it

Fixes Ticket2905

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

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