64867 Commits

Author SHA1 Message Date
Michael Niedermayer
557e3790ef avformat/flvdec: Use av_freep() avoid leaving stale pointers in memory
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 91ea466551c148bd897706a1b6a168e783761a06)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-06 18:28:34 +01:00
Michael Niedermayer
2b15ceec62 configure: create the tests directory like the doc directory
This fixes an issue where the tests directory is not created for out of tree
builds before its needed

Tested-by: Dave Yeo <daveryeo@telus.net>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit e631872f13b6be0583603d45a11e53319754bc8d)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-06 18:28:33 +01:00
wm4
c3cd7b8a29 lavu/frame: fix malloc error path in av_frame_copy_props()
The error path frees all side data, but forgets to reset the side data
count. This can blow up later in av_frame_unref() and free_side_data().

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-06 18:28:33 +01:00
Michael Niedermayer
0621421ee2 avformat/utils: Do not update programs streams from program-less streams in update_wrap_reference()
Fixes Ticket3686

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-06 18:28:33 +01:00
Michael Niedermayer
0e9fe8510e avformat/aviobuf: Check that avio_seek() target is non negative
Fixes out of array access

Suggested-by: Andrew Scherkus <scherkus@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit ed86dbd05d61363dc1c0d33f3267e2177c985fdd)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-06 18:28:33 +01:00
Rob Sykes
1f59cfe65b swresample/soxr_resample: fix error handling
Fixes CID1257659

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-06 18:28:33 +01:00
wm4
a6f808b36a avformat/matroskadec: fix handling of recursive SeekHead elements
When matroska_execute_seekhead() is called, it goes through the list of
seekhead entries and attempts to read elements not read yet. When doing
this, the parser can find further SeekHead elements, and will extend the
matroska->seekhead list. This can lead to a (practically) infinite loop
with certain broken files. (Maybe it can happen even with valid files.
The demuxer doesn't seem to check correctly whether an element has
already been read.)

Fix this by ignoring elements that were added to the seekhead field
during executing seekhead entries.

This does not fix the possible situation when multiple SeekHead elements
after the file header (i.e. occur after the "before_pos" file position)
point to the same elements. These elements will probably be parsed
multiple times, likely leading to bugs.

Fixes ticket #4162.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-06 18:28:33 +01:00
Michael Niedermayer
4a495766d1 doc/examples/transcoding: check encoder before using it
Fixes null pointer exception

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-06 18:28:33 +01:00
Michael Niedermayer
cedb96db37 swscale/x86/rgb2rgb_template: fix crash with tiny size and nv12 output
Fixes Ticket4151

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-06 18:28:33 +01:00
Michael Niedermayer
de75b4063d avformat/rmdec: Check codec_data_size
Fixes infinite loop
Fixes Ticket4154

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-06 18:28:33 +01:00
Michael Niedermayer
bb70b6673f avformat/aviobuf: Fix infinite loop in ff_get_line()
Fixes ticket4152

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-06 18:28:33 +01:00
Michael Niedermayer
a07dfcdd6d avcodec/motion_est: use 2x8x8 for interlaced qpel
Fixes out of array read
Fixes Ticket4121

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-06 18:25:51 +01:00
Anton Khirnov
5630d5cdc2 opusdec: make sure all substreams have the same number of coded samples
Fixes invalid writes with invalid multichannel streams.

CC:libav-stable@libav.org
(cherry picked from commit 1973079417e8701b52ba810a72cb6c7c6f7f9a56)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-06 18:25:51 +01:00
Michael Niedermayer
87d0339d67 avcodec/hevc_ps: Check num_long_term_ref_pics_sps
Fixes out of array access
Fixes: signal_sigsegv_35bd0f0_1182_cov_791726764_STRUCT_B_Samsung_4.bit
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit ea38e5a6b75706477898eb1e6582d667dbb9946c)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-06 18:25:51 +01:00
Michael Niedermayer
fac6ae0814 avcodec/mjpegdec: Fix integer overflow in shift
Fixes: signal_sigabrt_7ffff6ac7bb9_2683_cov_4120310995_m_ijpg.avi
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 970a8f1c256f08d2f6414d573a54f2fa035c8e7a)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-06 18:25:51 +01:00
Michael Niedermayer
0c51b26729 avcodec/hevc_ps: Check return code from pps_range_extensions()
Fixes out of array read
Fixes: asan_heap-oob_177e222_885_cov_1532528832_MERGE_D_TI_3.bit
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 9f9440bd8122cc8798139c9370db0873a24ae14b)

Conflicts:

	libavcodec/hevc_ps.c
2015-01-06 18:25:51 +01:00
Michael Niedermayer
e0822b147f avcodec/rawdec: Check the return code of avpicture_get_size()
Fixes out of array access
Fixes: asan_heap-oob_22388d0_3435_cov_3297128910_small_roll5_FlashCine1.cine
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 1d3a3b9f8907625b361420d48fe05716859620ff)

Conflicts:

	libavcodec/rawdec.c
2015-01-06 18:25:50 +01:00
Michael Niedermayer
1bfd23d2c9 avcodec/pngdec: Check IHDR/IDAT order
Fixes out of array access
Fixes: asan_heap-oob_20a6c26_2690_cov_3434532168_mail.png
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 79ceaf827be0b070675d4cd0a55c3386542defd8)

Conflicts:

	libavcodec/pngdec.c
2015-01-06 18:25:50 +01:00
Michael Niedermayer
419bd6e303 avcodec/flacdec: Call ff_flacdsp_init() unconditionally
Fixes out of array access
Fixes: signal_sigsegv_324b135_3398_cov_246853371_short.flac
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit e5c01ccdf5a9a330d4c51a9b9ea721fd8f1fb70b)

Conflicts:

	libavcodec/flacdec.c
2015-01-06 18:25:50 +01:00
Michael Niedermayer
494d3d14db avcodec/utils: Check that the data is complete in avpriv_bprint_to_extradata()
Fixes out of array read
Fixes: asan_heap-oob_4d2250_814_cov_2745172097_JACOsub_capability_tester.jss
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 3d5d95db3f5d8e2093e9e19d0c46e86f54ed2a5d)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-06 18:25:50 +01:00
Michael Niedermayer
6c63eb5909 avcodec/mjpegdec: Fix context fields becoming inconsistent
Fixes out of array access
Fixes: asan_heap-oob_1ca4f85_2760_cov_144449187_miss_congeniality_pegasus_ljpg.avi
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 0eecf40935b22644e6cd74c586057237ecfd6844)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-06 18:25:50 +01:00
Michael Niedermayer
142896f2d0 avcodec/mjpegdec: Check for pixfmtid 0x42111100 || 0x24111100 with more than 8 bits
These cases are not supported yet

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

Conflicts:

	libavcodec/mjpegdec.c
(cherry picked from commit bc73ee996b08b331d5a6c41df6acdd53e8deeb5d)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-06 18:25:50 +01:00
Michael Niedermayer
dca70c5931 swscale/x86/rgb2rgb_template: handle the first 2 lines with C in rgb24toyv12_*()
This avoids out of array accesses
Should fix Ticket3451

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-06 18:25:50 +01:00
Michael Niedermayer
17ff5d3f88 doc/APIchanges: Fix some wrong versions
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 4eae568a0712b8b59cb74b3882963f938c26eab4)

Conflicts:

	doc/APIchanges
(cherry picked from commit f00c8f879ac311066001b74d3f396cf3dc1f9ad3)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-06 18:25:50 +01:00
Michael Niedermayer
693d0d3ac5 avformat/hlsenc: Free context after hls_append_segment
Fixes reading uninitialized memory

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

Conflicts:

	libavformat/hlsenc.c
(cherry picked from commit 0ac22f043bee2f1c4daf5e1044b014326325d929)

Conflicts:

	libavformat/hlsenc.c
2015-01-06 18:25:50 +01:00
Lukasz Marek
bb2c09310c lavu/opt: fix av_opt_get function
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
(cherry picked from commit 173d51c982f1ecaa8d28cd0d8611164be0c9d36d)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-06 18:25:50 +01:00
Michael Niedermayer
66261cfa77 avcodec/wmaprodec: Fix integer overflow in sfb_offsets initialization
Fixes out of array read
Fixes: asan_heap-oob_2aec5b0_1828_classical_22_16_2_16000_v3c_0_exclusive_0_29.wma
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 5dcb99033df16eccc4dbbc4a099ad64457f9f090)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-06 18:25:50 +01:00
Michael Niedermayer
b89b136c00 avcodec/utvideodec: fix assumtation that slice_height >= 1
Fixes out of array read
Fixes: asan_heap-oob_2573085_3783_utvideo_rgba_median.avi
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 7656c4c6e66f8a787d384f027ad824cc1677fda1)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-06 18:25:50 +01:00
Michael Niedermayer
6ed35a6674 avcodec/options_table fix min of audio channels and sample rate
Found-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 206c98f303e833c9e94427c9e3f9867f85265f78)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-06 18:25:50 +01:00
Carl Eugen Hoyos
d4c70c8b50 lavc/utils: Make pix_fmt desc pointer const.
Fixes an "initialization discards qualifiers from pointer target type" warning.
(cherry picked from commit f05855414ed4cce97c06ba2a31f4987af47e6d4e)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-06 18:25:50 +01:00
Michael Niedermayer
05bc6f8ba6 avcodec/h264_slice: Clear table pointers to avoid stale pointers
Might fix Ticket3889

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-06 18:25:50 +01:00
Clément Bœsch
c2517fb363 avformat/rsd: make tag_buf string larger
av_get_codec_tag_string() uses more that 1 char for unprintable characters.

(cherry picked from commit edbbb11488e1fce9b9703535936d2e1731e2e318)
2014-12-19 18:02:27 -03:00
Michael Stypa
0cc15f7c83 fix Makefile objects for pulseaudio support
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit cb58c771ade66afcc623250e1c7ac8191381d991)
2014-12-01 00:21:57 +01:00
Michael Niedermayer
b6ff3acafc avformat/avidec: fix handling dv in avi
Fixes Ticket4086

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit f0ae0354d3f04c369257c2a28557524d28c5df15)
2014-11-21 09:55:19 +01:00
Michael Niedermayer
8047380514 avformat/segment: export inner muxer timebase
Fixes "Non-monotonous DTS in output stream 0:0"
Fixes Ticket4020

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit ce80f9fee97160049687bbbef4eb31a68166c3ee)
2014-11-17 01:13:20 +01:00
Michael Niedermayer
b152305bb3 Revert "v4l2: setting device parameters early"
This reverts commit b1ad9312331759679a9c956233716a67ae681d89.

Fixes Ticket #3517

Requested-by: Giorgio Vazzana <mywing81@gmail.com>
Merged-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 6f21fb793238ab6a790b94b86084148d99373ddf)

Conflicts:
	libavdevice/v4l2.c
2014-11-08 14:26:27 +01:00
Michael Niedermayer
a0605792c2 avcodec/mpegaudio_parser: fix off by 1 error in bitrate calculation
Fixes Ticket3918

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 817663897e59f45f60016fa9d3d16e325b803967)
2014-11-06 01:06:17 +01:00
Michael Niedermayer
4b8cb3fe51 avcodec/h264_parser: rewrite the parse_nal_units() loop logic based on h264.c
Fixes Ticket4011

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-01 17:11:41 +01:00
Michael Niedermayer
48bf926bad avcodec/h264: simplify find_start_code()
this also uses avpriv_find_start_code(), though no speed change is expected as
the area searched is generally small

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-01 17:09:16 +01:00
Michael Niedermayer
ab43652c67 Move get_avc_nalsize() and find_start_code() to h264.h
This allows sharing them with the h264 parser

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

Conflicts:

	libavcodec/h264.c
2014-11-01 17:05:35 +01:00
Michael Niedermayer
48b586ca4e ffmpeg: Copy extradata if it has been initialized later from the encoder
Fixes Ticket3909

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit ab84effdeda931a74d8503891488ed538619a5d3)
2014-11-01 15:53:19 +01:00
Michael Niedermayer
4e2e997faf avformat/mpeg: increase score for short mpeg-ps by 1
Fixes Ticket 3855

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 5109ce2017c15202275b33bce58ec9d88044eeb5)
2014-11-01 15:52:43 +01:00
Michael Niedermayer
19ccc06d8b avformat/mp3dec: Improve seeking frame sync code
Fixes Ticket3884

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 1b5ccae0f2045ac86bc9e1257cec1b3fba81315f)
2014-11-01 15:52:08 +01:00
Clément Bœsch
193b949f71 avcodec/mjpegdec: Fix chroma width rounding
Fixes vertical line at the right side
Fixes Ticket 3929

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit b96d864fd685aa1f661a5f8666224129d68b8eaf)
2014-11-01 15:51:41 +01:00
Michael Niedermayer
63ed7e09dd avformat/mpegts: Improve probe heuristic by considering the overall frequency of 0x47 headers
Fixes Ticket3939

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 296cd9c432775bbf57867fd76e8d2f505a512569)
2014-11-01 15:51:03 +01:00
Michael Niedermayer
10464ca0eb avformat/options_table: add FF_COMPLIANCE_UNOFFICIAL
Fixes ticket 3959

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit c02ea58c5f0a77f20c8046041edb974bb4376f4c)
2014-11-01 15:49:41 +01:00
Michael Niedermayer
4f515913a2 avformat/matroskadec: do not trust the default duration to be the real 1/timebase if its less than 5fps
Fixes Ticket3980

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit be695ee389724d713e1b8a61ef899fe1795193ce)
2014-11-01 15:48:58 +01:00
Michael Niedermayer
b44506c393 update for 2.3.5
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
n2.3.5
2014-11-01 14:30:10 +01:00
Michael Niedermayer
9395a3a96b avcodec/svq1dec: zero terminate embedded message before printing
Fixes out of array access
Fixes: asan_stack-oob_49b1e5_10_009.mov
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit e91ba2efa949470e9157b652535d207a101f91e0)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-30 18:38:45 +01:00
Michael Niedermayer
25d2a4dde7 avcodec/cook: check that the subpacket sizes fit in block_align
Fixes out of array read
Fixes: asan_heap-oob_fb5c50_19_018.rmvb
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 10e32618acce9c3fc64c061eb7907e8a8d2749ae)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-30 17:23:37 +01:00