68546 Commits

Author SHA1 Message Date
Michael Niedermayer
e29f68cf9e avcodec/x86/h264_weight: handle weight1=128
Fix ticket4596

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit e1009665759d4a3938dd2dd07b7e84d8bc9c5290)
2015-06-19 11:10:30 +02:00
Paul B Mahol
f621ae6a6d avcodec/exr: fix crash caused by merge
Various header informations need to be reset when decoding next frame.
Regression since: 95582b5c

Fixes ticket #4597.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
(cherry picked from commit a03b69478b7f1c0c31e53acb0cf392917c0f967a)
2015-06-19 11:10:13 +02:00
Andreas Cadhalpun
21d0ae829f nutdec: abort if EOF is reached in decode_info_header/read_sm_data
These loops can take a lot of time if count is very large.

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit bb23a15df507440deb0dcf25099d321d0f73dc28)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
n2.5.7
2015-05-23 00:57:08 +02:00
Andreas Cadhalpun
af27254eb3 nutdec: stop skipping bytes at EOF
This can unnecessarily waste a lot of time.

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit fa7dec8cb00d2d0dd96ff9863ccda38428610a21)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-23 00:56:38 +02:00
Andreas Cadhalpun
ffb4362bf0 nutdec: fix infinite resync loops
nut->last_syncpoint_pos doesn't necessarily change between resync
attempts, so find_any_startcode can return the same startcode again.

Thus remember where the last resync happened and don't try to resync
before that.

This can't be done locally in nut_read_packet, because this wouldn't
prevent infinite resync loops, where after the resync a packet is
returned and while reading a following packet the resync happens again.

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit 37e679881d364b6da817d829d35869d657218ab3)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-23 00:55:57 +02:00
Michael Niedermayer
3ea101b234 avformat/nutdec: Check X in 2nd branch of index reading
Prevents read of uninitialized variable

Based on patch by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit ebb0ca3d70465ab6d369a66b2ef43bb059705db8)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-23 00:52:44 +02:00
Michael Niedermayer
3c7ea2c46e Update for 2.5.7
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-21 21:42:38 +02:00
Michael Niedermayer
682ccd4167 avformat/nutdec: Fix recovery when immedeately after seeking a failure happens
Found-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit b3496b4a33e806b7afdcbbf6f468b0332b676d7c)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-21 20:43:39 +02:00
Michael Niedermayer
e7e1832cfd avformat/nutdec: Return error on EOF from get_str()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 6bbb2f8f4da67af374d62403742482cc5962aa21)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-21 20:43:39 +02:00
Andreas Cadhalpun
23e88c81d6 nutdec: fix memleaks on error in nut_read_header
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 361702660d2c37a63b7d6381d39e1e1de8405260)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-21 20:43:39 +02:00
Martin Storsjö
6b7c621839 rtsp: Make sure we don't write too many transport entries into a fixed-size array
(cherry picked from commit b90adb0aba073f9c1b4abca852119947393ced4c)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-21 20:43:39 +02:00
Andrey Utkin
3d65a272da rtpenc_jpeg: handle case of picture dimensions not dividing by 8
This fixes the calculation of the number of needed blocks to make
sure that ALL pixels are represented by the result.

Reviewed-by: Thomas Volkert <silvo@gmx.net>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 7f64a7503b19b39f1251e4380987034c569bebf5)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-21 20:43:39 +02:00
Michael Niedermayer
458ba000a5 avformat/mp3dec: Check for avcodec_alloc_context3() failure
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit b851bc20c6931c084710e69f7eec30d8c1bdb68e)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-21 20:43:39 +02:00
Michael Niedermayer
64c82912a7 avformat/mp3dec: properly allocate dummy AVCodecContext
Fixes (harmless) use of uninitialized variable

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

Conflicts:

	libavformat/mp3dec.c
2015-05-21 20:43:39 +02:00
Nicolas George
1aaf9613a8 lavd/xcbgrab: fix comparison with screen size.
Signed-off-by: Nicolas George <george@nsup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 7971fa9ce0ead8d2e8a79dbe422e91dcef8222ba)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-21 20:43:39 +02:00
Michael Niedermayer
8b95fc6d8d avcodec/golomb: get_ur_golomb_jpegls: Fix reading huge k values
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit c720b9ce9850710e74a103d9626869e397a89faa)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-21 20:43:39 +02:00
Michael Niedermayer
10b77a3471 avformat/mov: Fix parsing short loci
Fixes Ticket4557

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-21 20:43:39 +02:00
Michael Niedermayer
7e3d413f12 avformat/mov: Print reason of loci parsing failure
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 9e4f0cfc8ff4ab635ea12bdbd8d85d8bb1ba25f9)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-21 20:43:39 +02:00
Michael Niedermayer
1bf416dfc3 avcodec/hevc: Fix typo in num_entry_point_offsets check
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 3051e7fa712dfe2136f19b7157211453895f2a3c)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-21 20:43:39 +02:00
Michael Niedermayer
d3c9d87eea avcodec/libtheoraenc: Check for av_malloc failure
Fixes CID1257799

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-21 20:43:39 +02:00
Michael Niedermayer
228f7c7eed avcodec/dcadec: Check active_bands
Fixes CID1297594 part2

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-21 20:43:39 +02:00
Michael Niedermayer
ba82b23a1d avcodec/dcadec: Check scale table index
Fixes CID1297594 part 1

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

Conflicts:

	libavcodec/dcadec.c
2015-05-21 20:43:39 +02:00
Michael Niedermayer
665b343f92 avcodec/sonic: More completely check sample_rate_index and channels
Fixes CID1271783

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-21 20:43:39 +02:00
Michael Niedermayer
43f9ec7113 avcodec/sonic: check memory allocations
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit c131a9fead5bf63215b6e1172b3c5c183cf90b85)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-21 20:43:39 +02:00
Michael Niedermayer
8d02ba5b7b avcodec/smvjpegdec: check avcodec_decode_video2() return code
Fixes CID1271810

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-21 20:43:39 +02:00
Michael Niedermayer
cb0cc44f3a avcodec/shorten: More complete pred_order check
Fixes CID1239055

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-21 20:43:39 +02:00
Michael Niedermayer
71689e7863 avcodec/shorten: Check skip_bytes()
Fixes CID1210526

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-21 20:43:39 +02:00
Michael Niedermayer
d2fbf8b569 avcodec/shorten: Fix code depending on signed overflow behavior
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 2d15588124ab1d4c0612cab66f02a716f1509211)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-21 20:43:39 +02:00
Michael Niedermayer
c14359f24d avcodec/proresdec2: Reset slice_count on deallocation
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit c4c6aea397f62421bf8ef0449b2b465a53e4ab4d)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-21 20:43:39 +02:00
Michael Niedermayer
9fb1c02f30 ffmpeg_opt: Fix -timestamp parsing
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 107e4da47644fe615ea821d6a19682d73789aca7)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-21 20:43:39 +02:00
Michael Niedermayer
4a49f1e764 avcodec/dcadec: Check subsubframes
Fixes: CID1239152

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-21 20:43:39 +02:00
Michael Niedermayer
474bfd5438 avcodec/dcadec: Check nchans
Fixes CID1239110

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-21 20:43:39 +02:00
wm4
02c1074f18 hevc: make avcodec_decode_video2() fail if get_format() fails
Personally, I need the decoder to back out if get_format() returns no
usable pixel format. This didn't work because the error code was not
propagated down the call chain. This in turn happened because the
variable declaration removed in this patch shadowed the variable, whose
value is returned at the end of the function. Consequently, failures of
decode_nal_unit() were ignored in this place.

Reviewed-by:  Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit cc5e4bb48476a89cc8ce0c41bc2bd2e8fda9b37c)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-21 20:43:39 +02:00
Michael Niedermayer
db00ecbc96 avcodec/cavsdec: Use ff_set_dimensions()
Fixes CID1239111 part2

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-21 20:43:39 +02:00
Michael Niedermayer
ebdbb13108 avcodec/cavsdec: Check esc_code
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 139e1c8009df7729a53eaaae7036ca01071aced5)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-21 20:43:38 +02:00
Michael Niedermayer
cdc4727766 avcodec/on2avc: Check run more carefully
Fixes CID1239106

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-21 20:43:38 +02:00
Michael Niedermayer
4858ee1d9c avcodec/mpeg4audio: add some padding/alignment to MAX_PCE_SIZE
This avoids potential accesses over the end

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-21 20:43:38 +02:00
Rainer Hochecker
63d484c342 swr: fix alignment issue caused by 8ch sse functions
Fix crash when doing 8 ch conversion from apps compiled with MSVS
Thanks to Ronald for giving this hint:
https://ffmpeg.org/pipermail/ffmpeg-devel/2015-May/173049.html

Reviewed-by: "Ronald S. Bultje" <rsbultje@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit adb7372f7495927a226edf9b8e1d0ac9453985ea)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-21 20:43:38 +02:00
Michael Niedermayer
4c6224b1cd avcodec/mjpegdec: fix len computation in ff_mjpeg_decode_dqt()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 81cf9108563510dee24f73b2c5d94a7bd07ff747)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-21 20:43:38 +02:00
Michael Niedermayer
bf2254bffd avcodec/jpeg2000dec: fix boolean operator
Fixes CID1271791 #7-6

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-21 20:43:38 +02:00
Michael Niedermayer
2cab5f4ad0 avcodec/hevc_ps: Explicitly check num_tile_* for negative values
This fixes nothing but maybe helps coverity which does not see that this is failing later

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-21 20:43:38 +02:00
Michael Niedermayer
1ed8a10487 avcodec/hevc_ps: Check vps_num_hrd_parameters
Fix CID1239052 part2

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-21 20:43:38 +02:00
Michael Niedermayer
502684348b avcodec/hevc_ps: More completely check vps_num_layer_sets
Fixes CID1239052  part1

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-21 20:43:38 +02:00
Michael Niedermayer
58f310f496 avcodec/hevc: Check num_entry_point_offsets
Fixes CID1239099 part 2

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-21 20:43:38 +02:00
Michael Niedermayer
0230a8efc6 avcodec/hevc: Check offset_len
Fixes CID1239099 part 1

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-21 20:43:38 +02:00
Nick Lewycky
ef5fa5099b libswscale/x86/hscale_fast_bilinear_simd.c: Include BX in the clobber list on x86_64, because it isn't implicitly included when PIC is on.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 48e9f68384a2af257b9ca7633bf14f0c2748edc6)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-21 20:43:38 +02:00
Michael Niedermayer
885f501f7a avcodec/hevc_sei: Check num_sps_ids_minus1 value
Fixes CID1271794

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-21 20:43:38 +02:00
Michael Niedermayer
00223d461b avcodec/vqavideo: Check chunk size
Fixes CID1239154

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-21 20:43:38 +02:00
Andreas Cadhalpun
7d45230d81 aacdec: don't return frames without data
Since commit 676a395a aac->frame->data is not necessarily allocated at
the end of aac_decode_frame_int if avctx->channels is 0.

In this case a bogus frame without any data, but non-zero nb_samples is
returned.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit ec38a1ba404b8cb8d71ccee2b8dcd6f3fcbde273)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-21 20:43:38 +02:00
Michael Niedermayer
254e3af60f avformat/hevc: Check num_negative_pics and num_positive_pics
Fixes CID1238994

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-21 20:43:38 +02:00