ffmpeg.git
4 years agoavcodec/sonic: check memory allocations
Michael Niedermayer [Fri, 15 May 2015 15:26:25 +0000 (17:26 +0200)]
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>
4 years agoavcodec/smvjpegdec: check avcodec_decode_video2() return code
Michael Niedermayer [Fri, 15 May 2015 15:21:10 +0000 (17:21 +0200)]
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>
4 years agoavcodec/shorten: More complete pred_order check
Michael Niedermayer [Fri, 15 May 2015 15:02:28 +0000 (17:02 +0200)]
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>
4 years agoavcodec/shorten: Check skip_bytes()
Michael Niedermayer [Fri, 15 May 2015 14:48:31 +0000 (16:48 +0200)]
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>
4 years agoavcodec/shorten: Fix code depending on signed overflow behavior
Michael Niedermayer [Fri, 15 May 2015 14:58:51 +0000 (16:58 +0200)]
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>
4 years agoavcodec/proresdec2: Reset slice_count on deallocation
Michael Niedermayer [Fri, 15 May 2015 13:23:32 +0000 (15:23 +0200)]
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>
4 years agoffmpeg_opt: Fix -timestamp parsing
Michael Niedermayer [Sat, 9 May 2015 11:07:00 +0000 (13:07 +0200)]
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>
4 years agoavcodec/dcadec: Check subsubframes
Michael Niedermayer [Thu, 14 May 2015 19:29:19 +0000 (21:29 +0200)]
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>
4 years agoavcodec/dcadec: Check nchans
Michael Niedermayer [Thu, 14 May 2015 18:49:25 +0000 (20:49 +0200)]
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>
4 years agohevc: make avcodec_decode_video2() fail if get_format() fails
wm4 [Thu, 14 May 2015 16:27:31 +0000 (18:27 +0200)]
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>
4 years agoavcodec/cavsdec: Check esc_code
Michael Niedermayer [Thu, 14 May 2015 15:54:40 +0000 (17:54 +0200)]
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>
4 years agoavcodec/on2avc: Check run more carefully
Michael Niedermayer [Wed, 13 May 2015 23:01:35 +0000 (01:01 +0200)]
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>
4 years agoavcodec/mpeg4audio: add some padding/alignment to MAX_PCE_SIZE
Michael Niedermayer [Wed, 13 May 2015 22:09:56 +0000 (00:09 +0200)]
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>
4 years agoswr: fix alignment issue caused by 8ch sse functions
Rainer Hochecker [Wed, 13 May 2015 16:31:27 +0000 (18:31 +0200)]
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>
4 years agoavcodec/mjpegdec: fix len computation in ff_mjpeg_decode_dqt()
Michael Niedermayer [Wed, 13 May 2015 16:36:19 +0000 (18:36 +0200)]
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>
4 years agoavcodec/jpeg2000dec: fix boolean operator
Michael Niedermayer [Wed, 13 May 2015 13:15:55 +0000 (15:15 +0200)]
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>
4 years agoavcodec/hevc_ps: Explicitly check num_tile_* for negative values
Michael Niedermayer [Wed, 13 May 2015 11:53:33 +0000 (13:53 +0200)]
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>
4 years agoavcodec/hevc_ps: Check vps_num_hrd_parameters
Michael Niedermayer [Wed, 13 May 2015 11:35:57 +0000 (13:35 +0200)]
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>
4 years agoavcodec/hevc_ps: More completely check vps_num_layer_sets
Michael Niedermayer [Wed, 13 May 2015 11:35:37 +0000 (13:35 +0200)]
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>
4 years agoavcodec/hevc: Check num_entry_point_offsets
Michael Niedermayer [Wed, 13 May 2015 11:21:52 +0000 (13:21 +0200)]
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>
4 years agoavcodec/hevc: Check offset_len
Michael Niedermayer [Wed, 13 May 2015 11:13:07 +0000 (13:13 +0200)]
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>
4 years agolibswscale/x86/hscale_fast_bilinear_simd.c: Include BX in the clobber list on x86_64...
Nick Lewycky [Wed, 13 May 2015 01:07:57 +0000 (18:07 -0700)]
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>
4 years agoavcodec/hevc_sei: Check num_sps_ids_minus1 value
Michael Niedermayer [Tue, 12 May 2015 23:31:15 +0000 (01:31 +0200)]
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>
4 years agoavcodec/vqavideo: Check chunk size
Michael Niedermayer [Tue, 12 May 2015 22:41:38 +0000 (00:41 +0200)]
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>
4 years agoaacdec: don't return frames without data
Andreas Cadhalpun [Tue, 12 May 2015 18:27:21 +0000 (20:27 +0200)]
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>
4 years agoavformat/hevc: Check num_negative_pics and num_positive_pics
Michael Niedermayer [Tue, 12 May 2015 17:28:15 +0000 (19:28 +0200)]
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>
4 years agoavformat/hevc: Check cpb_cnt_minus1
Michael Niedermayer [Tue, 12 May 2015 17:09:06 +0000 (19:09 +0200)]
avformat/hevc: Check cpb_cnt_minus1

Fixes CID1239014

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/matroskadec: Cleanup error handling for bz2 & zlib
Michael Niedermayer [Tue, 12 May 2015 16:32:12 +0000 (18:32 +0200)]
avformat/matroskadec: Cleanup error handling for bz2 & zlib

Fixes CID703652

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/nutdec: Fix use of uinitialized value
Michael Niedermayer [Tue, 12 May 2015 16:20:23 +0000 (18:20 +0200)]
avformat/nutdec: Fix use of uinitialized value

Fixes CID1041175

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/rtpenc_jpeg: Check remaining buffer size for SOS
Michael Niedermayer [Tue, 12 May 2015 15:55:40 +0000 (17:55 +0200)]
avformat/rtpenc_jpeg: Check remaining buffer size for SOS

Fixes CID1238818

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/rtpdec_xiph: Check upper bound on len in xiph_handle_packet()
Michael Niedermayer [Tue, 12 May 2015 16:03:55 +0000 (18:03 +0200)]
avformat/rtpdec_xiph: Check upper bound on len in xiph_handle_packet()

Larger packets are not supported and would cause problems later

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agotools/graph2dot: use larger data types than int for array/string sizes
Michael Niedermayer [Tue, 12 May 2015 01:59:30 +0000 (03:59 +0200)]
tools/graph2dot: use larger data types than int for array/string sizes

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/matroskaenc: Check ff_vorbiscomment_length in put_flac_codecpriv()
Michael Niedermayer [Mon, 11 May 2015 13:37:38 +0000 (15:37 +0200)]
avformat/matroskaenc: Check ff_vorbiscomment_length in put_flac_codecpriv()

Its currently guaranteed to be smaller but its safer to check anyway

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/oggenc: Check ff_vorbiscomment_length in ogg_write_vorbiscomment()
Michael Niedermayer [Mon, 11 May 2015 13:34:28 +0000 (15:34 +0200)]
avformat/oggenc: Check ff_vorbiscomment_length in ogg_write_vorbiscomment()

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/flacenc: Check length in flac_write_block_comment()
Michael Niedermayer [Mon, 11 May 2015 13:30:32 +0000 (15:30 +0200)]
avformat/flacenc: Check length in flac_write_block_comment()

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/subtitles: Use size_t for len
Michael Niedermayer [Sun, 10 May 2015 13:38:40 +0000 (15:38 +0200)]
avformat/subtitles: Use size_t for len

string length could theoretically be larger than int

Reviewed-by: Clément Bœsch <u@pkh.me>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit a633928d47057426a9c328da594407d1c7da8a5c)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/url: Use size_t for len from strlen()
Michael Niedermayer [Mon, 11 May 2015 01:50:01 +0000 (03:50 +0200)]
avformat/url: Use size_t for len from strlen()

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavutil/avstring: Use size_t in av_strlcatf()
Michael Niedermayer [Mon, 11 May 2015 18:01:15 +0000 (20:01 +0200)]
avutil/avstring: Use size_t in av_strlcatf()

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/vorbiscomment: Check entry length in ff_vorbiscomment_write()
Michael Niedermayer [Mon, 11 May 2015 13:23:51 +0000 (15:23 +0200)]
avformat/vorbiscomment: Check entry length in ff_vorbiscomment_write()

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavutil/dict: Use size_t for appending strings
Michael Niedermayer [Sun, 10 May 2015 14:09:07 +0000 (16:09 +0200)]
avutil/dict: Use size_t for appending strings

the string length is not constrained to INT_MAX

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

Conflicts:

libavutil/dict.c

4 years agolibavutil/mem: use size_t for the length in av_strdup()
Michael Niedermayer [Sun, 10 May 2015 14:06:50 +0000 (16:06 +0200)]
libavutil/mem: use size_t for the length in av_strdup()

the string length is not constrained to INT_MAX

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoaacsbr: break infinite loop in sbr_hf_calc_npatches
Andreas Cadhalpun [Wed, 22 Apr 2015 13:23:24 +0000 (15:23 +0200)]
aacsbr: break infinite loop in sbr_hf_calc_npatches

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agodiracdec: check that block length is valid
Andreas Cadhalpun [Wed, 6 May 2015 13:34:53 +0000 (15:34 +0200)]
diracdec: check that block length is valid

In init_planes p->xblen and p->yblen are set to:
            p->xblen = s->plane[0].xblen >> s->chroma_x_shift;
            p->yblen = s->plane[0].yblen >> s->chroma_y_shift;

These are later used as block_w and block_h arguments of
s->vdsp.emulated_edge_mc. If one of them is 0 it triggers an av_assert2
in emulated_edge_mc:
    av_assert2(start_x < end_x && block_w > 0);
    av_assert2(start_y < end_y && block_h > 0);

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoffmpeg_opt: Set the video VBV parameters only for the video stream from -target
Michael Niedermayer [Mon, 25 May 2015 10:13:53 +0000 (12:13 +0200)]
ffmpeg_opt: Set the video VBV parameters only for the video stream from -target

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/bitstream: Assert that there is enough space left in avpriv_copy_bits()
Michael Niedermayer [Mon, 25 May 2015 01:48:45 +0000 (03:48 +0200)]
avcodec/bitstream: Assert that there is enough space left in avpriv_copy_bits()

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/put_bits: Assert that there is enough space left in skip_put_bytes()
Michael Niedermayer [Mon, 25 May 2015 01:45:38 +0000 (03:45 +0200)]
avcodec/put_bits: Assert that there is enough space left in skip_put_bytes()

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/mpegvideo_enc: Update the buffer size as more slices are merged
Michael Niedermayer [Mon, 25 May 2015 02:54:41 +0000 (04:54 +0200)]
avcodec/mpegvideo_enc: Update the buffer size as more slices are merged

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/put_bits: Update size_in_bits in set_put_bits_buffer_size()
Michael Niedermayer [Mon, 25 May 2015 02:53:09 +0000 (04:53 +0200)]
avcodec/put_bits: Update size_in_bits in set_put_bits_buffer_size()

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/wavdec: Increase dts packet threshold to fix more misdetections
Rodger Combs [Sat, 23 May 2015 12:07:14 +0000 (14:07 +0200)]
avformat/wavdec: Increase dts packet threshold to fix more misdetections

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/wavdec: Increase probe_packets limit
Michael Niedermayer [Sat, 23 May 2015 10:03:38 +0000 (12:03 +0200)]
avformat/wavdec: Increase probe_packets limit

Fixes DTS detection of b2429e5ba9.dts

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agonutdec: abort if EOF is reached in decode_info_header/read_sm_data
Andreas Cadhalpun [Tue, 19 May 2015 22:34:42 +0000 (00:34 +0200)]
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>
4 years agonutdec: stop skipping bytes at EOF
Andreas Cadhalpun [Tue, 19 May 2015 22:31:24 +0000 (00:31 +0200)]
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>
4 years agonutdec: fix infinite resync loops
Andreas Cadhalpun [Tue, 19 May 2015 22:06:05 +0000 (00:06 +0200)]
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>
4 years agoavformat/nutdec: Check X in 2nd branch of index reading
Michael Niedermayer [Fri, 22 May 2015 22:23:05 +0000 (00:23 +0200)]
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>
4 years agoavformat/nutdec: Fix recovery when immedeately after seeking a failure happens
Michael Niedermayer [Wed, 20 May 2015 15:32:48 +0000 (17:32 +0200)]
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>
4 years agoavformat/nutdec: Return error on EOF from get_str()
Michael Niedermayer [Wed, 20 May 2015 15:13:15 +0000 (17:13 +0200)]
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>
4 years agoMerge commit '0069d4597bda5723fbcae410784bbfa4750df706' into release/2.4
Michael Niedermayer [Mon, 1 Jun 2015 02:50:21 +0000 (04:50 +0200)]
Merge commit '0069d4597bda5723fbcae410784bbfa4750df706' into release/2.4

* commit '0069d4597bda5723fbcae410784bbfa4750df706':
  Update changelog for v11.4

Conflicts:
Changelog
RELEASE

Not merged, our changelog differs from this

Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoUpdate changelog for v11.4
Reinhard Tartler [Sun, 24 May 2015 08:36:42 +0000 (10:36 +0200)]
Update changelog for v11.4

4 years agoMerge commit '3b69f245dbe6e2016659a45c4bfe284f6c5ac57e' into release/2.4
Michael Niedermayer [Sat, 30 May 2015 22:13:22 +0000 (00:13 +0200)]
Merge commit '3b69f245dbe6e2016659a45c4bfe284f6c5ac57e' into release/2.4

* commit '3b69f245dbe6e2016659a45c4bfe284f6c5ac57e':
  h264: Make sure reinit failures mark the context as not initialized

Conflicts:
libavcodec/h264_slice.c

See: e8714f6f93d1a32f4e4655209960afcf4c185214
Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit '70642090960c35dcd6da941c869bdf55d4f3bb00' into release/2.4
Michael Niedermayer [Sat, 30 May 2015 21:46:38 +0000 (23:46 +0200)]
Merge commit '70642090960c35dcd6da941c869bdf55d4f3bb00' into release/2.4

* commit '70642090960c35dcd6da941c869bdf55d4f3bb00':
  msrle: Use FFABS to determine the frame size in msrle_decode_pal4

Conflicts:
libavcodec/msrledec.c

See: f7e1367f58263593e6cee3c282f7277d7ee9d553
Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoh264: Make sure reinit failures mark the context as not initialized
Luca Barbato [Mon, 25 May 2015 20:30:10 +0000 (22:30 +0200)]
h264: Make sure reinit failures mark the context as not initialized

Bug-Id: CVE-2015-3417
CC: libav-stable@libav.org
4 years agomsrle: Use FFABS to determine the frame size in msrle_decode_pal4
Luca Barbato [Mon, 25 May 2015 19:53:26 +0000 (21:53 +0200)]
msrle: Use FFABS to determine the frame size in msrle_decode_pal4

As done in msrle_decode_8_16_24_32.

Bug-Id: CVE-2015-3395
CC: libav-stable@libav.org
4 years agoMerge commit '4dc0fbb13c33b4e5bdb766652f4daf900ccc952f' into release/2.4
Michael Niedermayer [Thu, 28 May 2015 20:40:35 +0000 (22:40 +0200)]
Merge commit '4dc0fbb13c33b4e5bdb766652f4daf900ccc952f' into release/2.4

* commit '4dc0fbb13c33b4e5bdb766652f4daf900ccc952f':
  x86: cavs: Remove an unneeded scratch buffer

Conflicts:
libavcodec/x86/cavsdsp.c

See: d79f7bf0d63a81ee66026ee92a6946a7303d04bd
Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/x86/cavsdsp: remove unneeded tmp
Michael Niedermayer [Mon, 16 Mar 2015 13:28:11 +0000 (14:28 +0100)]
avcodec/x86/cavsdsp: remove unneeded tmp

This is faster and simpler as well

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

Conflicts:

libavcodec/x86/cavsdsp.c

4 years agox86: cavs: Remove an unneeded scratch buffer
Michael Niedermayer [Thu, 28 May 2015 10:38:35 +0000 (12:38 +0200)]
x86: cavs: Remove an unneeded scratch buffer

Simplifies the code and makes it build on certain compilers
running out of registers on x86.

CC: libav-stable@libav.org
Reported-By: mudler
(cherry picked from commit e4610300de6869bd6b3b00e76cfeabb6d7653dcd)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
4 years agoMerge commit 'b37bfbfbe53917820d1f97312fa0b2e8c7a15217' into release/2.4
Michael Niedermayer [Tue, 19 May 2015 20:02:26 +0000 (22:02 +0200)]
Merge commit 'b37bfbfbe53917820d1f97312fa0b2e8c7a15217' into release/2.4

* commit 'b37bfbfbe53917820d1f97312fa0b2e8c7a15217':
  configure: Disable i686 for i586 and lower CPUs

See: cdb3eee7c496f763d195de34be7f67783b98fb2c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit '5549f693d2181b3211427f65e48eaa2f4fc5a402' into release/2.4
Michael Niedermayer [Tue, 19 May 2015 20:01:43 +0000 (22:01 +0200)]
Merge commit '5549f693d2181b3211427f65e48eaa2f4fc5a402' into release/2.4

* commit '5549f693d2181b3211427f65e48eaa2f4fc5a402':
  mjpegenc: Fix JFIF header byte ordering

Conflicts:
libavcodec/mjpegenc_common.c

See: b19313218c32fa9446d474cbddb11c0776868cd3
Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit '1f64b018cbec018fa66a4a20f79958d9707913de' into release/2.4
Michael Niedermayer [Tue, 19 May 2015 20:01:11 +0000 (22:01 +0200)]
Merge commit '1f64b018cbec018fa66a4a20f79958d9707913de' into release/2.4

* commit '1f64b018cbec018fa66a4a20f79958d9707913de':
  nut: Make sure to clean up on read_header failure

Conflicts:
libavformat/nutdec.c

See: 361702660d2c37a63b7d6381d39e1e1de8405260
Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agonutdec: fix memleaks on error in nut_read_header
Andreas Cadhalpun [Tue, 28 Apr 2015 18:58:21 +0000 (20:58 +0200)]
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>
4 years agoMerge commit '0f50c53cfb959162f2bccc1a2c2e066d35723595' into release/2.4
Michael Niedermayer [Tue, 19 May 2015 19:39:24 +0000 (21:39 +0200)]
Merge commit '0f50c53cfb959162f2bccc1a2c2e066d35723595' into release/2.4

* commit '0f50c53cfb959162f2bccc1a2c2e066d35723595':
  png: Set the color range as full range

Conflicts:
libavcodec/pngdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit 'a55a70644872027fdf76a75edf12a09c9008880f' into release/2.4
Michael Niedermayer [Tue, 19 May 2015 19:24:39 +0000 (21:24 +0200)]
Merge commit 'a55a70644872027fdf76a75edf12a09c9008880f' into release/2.4

* commit 'a55a70644872027fdf76a75edf12a09c9008880f':
  avi: Validate sample_size

Conflicts:
libavformat/avidec.c

See: ca234639ac49a0dc073ac1f10977979acdb94f97
See: c7369f3a4bd21ea64571c1b0c4fcbf39f8daf68c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/avidec: print a warning for negative sample_size
Michael Niedermayer [Mon, 4 May 2015 21:42:24 +0000 (23:42 +0200)]
avformat/avidec: print a warning for negative sample_size

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavidec: avoid infinite loop due to negative ast->sample_size
Andreas Cadhalpun [Mon, 4 May 2015 21:01:45 +0000 (23:01 +0200)]
avidec: avoid infinite loop due to negative ast->sample_size

If max in clean_index is set to a negative ast->sample_size, the
following loop never ends:
        while (max < 1024)
            max += max;

Thus set ast->sample_size to 0 if it would otherwise be negative.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit '21b21aed797b5e636adcf2df811f96a95f208930' into release/2.4
Michael Niedermayer [Tue, 19 May 2015 19:22:59 +0000 (21:22 +0200)]
Merge commit '21b21aed797b5e636adcf2df811f96a95f208930' into release/2.4

* commit '21b21aed797b5e636adcf2df811f96a95f208930':
  nut: Check chapter creation in decode_info_header

Conflicts:
libavformat/nutdec.c

See: 3ff1af2b0db7132d5717be6395227a94c8abab07
Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agonutdec: check chapter creation in decode_info_header
Andreas Cadhalpun [Tue, 28 Apr 2015 18:57:59 +0000 (20:57 +0200)]
nutdec: check chapter creation in decode_info_header

This fixes a segmentation fault when accessing the metadata.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit 'cb5324200ccdc693dd5b28dcd7d4b722fad83ea2' into release/2.4
Michael Niedermayer [Tue, 19 May 2015 19:19:35 +0000 (21:19 +0200)]
Merge commit 'cb5324200ccdc693dd5b28dcd7d4b722fad83ea2' into release/2.4

* commit 'cb5324200ccdc693dd5b28dcd7d4b722fad83ea2':
  alac: Reject rice_limit 0 if compression is used

Conflicts:
libavcodec/alac.c

See: 4b657a1b1eedcf38bcf36e89a2f4be6f76b5ce09
Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit 'ac1660509ecfbeca7b63eb5ab8360011180e705b' into release/2.4
Michael Niedermayer [Tue, 19 May 2015 19:08:45 +0000 (21:08 +0200)]
Merge commit 'ac1660509ecfbeca7b63eb5ab8360011180e705b' into release/2.4

* commit 'ac1660509ecfbeca7b63eb5ab8360011180e705b':
  ape: Support _0000 files with nblock smaller than 64

Conflicts:
libavcodec/apedec.c

See: 699341d647f7af785fb8ceed67604467b0b9ab12
Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoapedec: prevent out of array writes in decode_array_0000
Andreas Cadhalpun [Tue, 28 Apr 2015 09:13:43 +0000 (11:13 +0200)]
apedec: prevent out of array writes in decode_array_0000

s->decoded_buffer is allocated with a min_size of:
    2 * FFALIGN(blockstodecode, 8) * sizeof(*s->decoded_buffer)

Then it is assigned to s->decoded[0] (and s->decoded_buffer + FFALIGN(blockstodecode, 8)
to s->decoded[1]) and passed as out buffer to decode_array_0000.

In this function 64 elements of the out buffer are written
unconditionally and outside the array if blockstodecode is too small.

This causes memory corruption, leading to segmentation faults or other
crashes.

Thus change decode_array_0000 to write at most blockstodecode elements
of the out buffer.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit '386e80610de282c92ad5897683ccaf2675766ac5' into release/2.4
Michael Niedermayer [Tue, 19 May 2015 19:07:24 +0000 (21:07 +0200)]
Merge commit '386e80610de282c92ad5897683ccaf2675766ac5' into release/2.4

* commit '386e80610de282c92ad5897683ccaf2675766ac5':
  mux: Do not leave stale side data pointers in ff_interleave_add_packet()

Conflicts:
libavformat/mux.c

See: bfb3ed1a9d5dafdc185080fdd88d02ff7221d30a
Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit '744d813bcf527481f2217428fa08bfee8642935b' into release/2.4
Michael Niedermayer [Tue, 19 May 2015 19:07:02 +0000 (21:07 +0200)]
Merge commit '744d813bcf527481f2217428fa08bfee8642935b' into release/2.4

* commit '744d813bcf527481f2217428fa08bfee8642935b':
  avresample: Reallocate the internal buffer to the correct size

Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/mpegts: Detect changes in packet through CRC instead of just the 5bit version
Michael Niedermayer [Fri, 1 May 2015 00:14:14 +0000 (02:14 +0200)]
avformat/mpegts: Detect changes in packet through CRC instead of just the 5bit version

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/mpegts: reset last_ver on corrupted packets
Michael Niedermayer [Fri, 1 May 2015 00:13:26 +0000 (02:13 +0200)]
avformat/mpegts: reset last_ver on corrupted packets

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/mpegts: Factorize version checking code out
Michael Niedermayer [Wed, 29 Apr 2015 20:24:09 +0000 (22:24 +0200)]
avformat/mpegts: Factorize version checking code out

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/mpegts: Also parse the FMC descriptor if the codec has not been identified yet
Michael Niedermayer [Wed, 29 Apr 2015 04:26:18 +0000 (06:26 +0200)]
avformat/mpegts: Also parse the FMC descriptor if the codec has not been identified yet

Fixes Detecting AAC with such descriptor if the parts needed for detection
are later in the stream

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/mpegts: reset last_version on seeking
Michael Niedermayer [Wed, 29 Apr 2015 03:00:51 +0000 (05:00 +0200)]
avformat/mpegts: reset last_version on seeking

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit '844201e35fe575710be8218d45828df49b77f205' into release/2.4
Michael Niedermayer [Tue, 19 May 2015 18:56:10 +0000 (20:56 +0200)]
Merge commit '844201e35fe575710be8218d45828df49b77f205' into release/2.4

* commit '844201e35fe575710be8218d45828df49b77f205':
  mpegts: Update the PSI/SI table only if the version change

Conflicts:
libavformat/mpegts.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit 'f77c9d71615e17414aacbb1720693b800a5a32d3' into release/2.4
Michael Niedermayer [Tue, 19 May 2015 18:50:46 +0000 (20:50 +0200)]
Merge commit 'f77c9d71615e17414aacbb1720693b800a5a32d3' into release/2.4

* commit 'f77c9d71615e17414aacbb1720693b800a5a32d3':
  rtsp: Make sure we don't write too many transport entries into a fixed-size array

Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit '4415d0f3bbaeb287327ef101ae98d727a69d9af1' into release/2.4
Michael Niedermayer [Tue, 19 May 2015 18:48:19 +0000 (20:48 +0200)]
Merge commit '4415d0f3bbaeb287327ef101ae98d727a69d9af1' into release/2.4

* commit '4415d0f3bbaeb287327ef101ae98d727a69d9af1':
  rtpenc_jpeg: Handle case of picture dimensions not dividing by 8

Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit '8ae4d4e117626313e0b7df746e82de84d00d160a' into release/2.4
Michael Niedermayer [Tue, 19 May 2015 18:40:33 +0000 (20:40 +0200)]
Merge commit '8ae4d4e117626313e0b7df746e82de84d00d160a' into release/2.4

* commit '8ae4d4e117626313e0b7df746e82de84d00d160a':
  mov: Fix little endian audio detection

Conflicts:
libavformat/mov.c

See: d2549ba9df1a1aac8c0ae19bfca2c81e508ba02e
Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit '2af720fe5f0418612a8fc26b0147a0e10414fcbe' into release/2.4
Michael Niedermayer [Tue, 19 May 2015 18:39:42 +0000 (20:39 +0200)]
Merge commit '2af720fe5f0418612a8fc26b0147a0e10414fcbe' into release/2.4

* commit '2af720fe5f0418612a8fc26b0147a0e10414fcbe':
  x86: Put COPY3_IF_LT under HAVE_6REGS

Conflicts:
libavcodec/x86/mathops.h

See: b38910c9790253b362839042a17e13252c1d4b90
Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit '9f6c36d961d27283808310e3ca1d8390b55fce9b' into release/2.4
Michael Niedermayer [Tue, 19 May 2015 18:37:23 +0000 (20:37 +0200)]
Merge commit '9f6c36d961d27283808310e3ca1d8390b55fce9b' into release/2.4

* commit '9f6c36d961d27283808310e3ca1d8390b55fce9b':
  roqvideoenc: set enc->avctx in roq_encode_init

See: cf82c426fadf90105e1fb9d5ecd267cc3aa2b288
Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit '78a3a4580c5a547af4ae8682c662ea3a4699a599' into release/2.4
Michael Niedermayer [Tue, 19 May 2015 18:25:47 +0000 (20:25 +0200)]
Merge commit '78a3a4580c5a547af4ae8682c662ea3a4699a599' into release/2.4

* commit '78a3a4580c5a547af4ae8682c662ea3a4699a599':
  mp3: Properly use AVCodecContext API

Conflicts:
libavformat/mp3dec.c

See: 6ad42b3e15478284321dd285acaf189a16590854
See: b851bc20c6931c084710e69f7eec30d8c1bdb68e
Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/mp3dec: Check for avcodec_alloc_context3() failure
Michael Niedermayer [Thu, 26 Feb 2015 19:11:19 +0000 (20:11 +0100)]
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>
4 years agoavformat/mp3dec: properly allocate dummy AVCodecContext
Michael Niedermayer [Thu, 26 Feb 2015 18:59:44 +0000 (19:59 +0100)]
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

4 years agoMerge commit '7244cefd6e6ba7258cb022dfd7a284099d88a3e8' into release/2.4
Michael Niedermayer [Tue, 19 May 2015 18:14:16 +0000 (20:14 +0200)]
Merge commit '7244cefd6e6ba7258cb022dfd7a284099d88a3e8' into release/2.4

* commit '7244cefd6e6ba7258cb022dfd7a284099d88a3e8':
  libvpx: Fix mixed use of av_malloc() and av_reallocp()

Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoconfigure: Disable i686 for i586 and lower CPUs
Mikulas Patocka [Mon, 15 Sep 2014 12:11:21 +0000 (05:11 -0700)]
configure: Disable i686 for i586 and lower CPUs

4 years agomjpegenc: Fix JFIF header byte ordering
Shiina Hideaki [Thu, 7 May 2015 00:46:55 +0000 (01:46 +0100)]
mjpegenc: Fix JFIF header byte ordering

The header had a wrong version description.

Bug-Id: 808
Signed-off-by: Shiina Hideaki <shiina@yndrd.com>
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
4 years agonut: Make sure to clean up on read_header failure
Luca Barbato [Wed, 29 Apr 2015 19:29:49 +0000 (21:29 +0200)]
nut: Make sure to clean up on read_header failure

Based on Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> work.

CC: libav-stable@libav.org
4 years agopng: Set the color range as full range
wm4 [Fri, 8 May 2015 15:01:50 +0000 (17:01 +0200)]
png: Set the color range as full range

The format uses full range for the gray formats.

CC: libav-stable@libav.org
4 years agoavi: Validate sample_size
Andreas Cadhalpun [Wed, 6 May 2015 00:26:57 +0000 (02:26 +0200)]
avi: Validate sample_size

And either error out or set it to 0 if it is negative.

CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>