ffmpeg.git
2 years agoChagelog: update n3.1.5
Michael Niedermayer [Fri, 21 Oct 2016 23:37:37 +0000 (01:37 +0200)]
Chagelog: update

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavformat/mxfdec: Check size to avoid integer overflow in mxf_read_utf16_string()
Michael Niedermayer [Fri, 21 Oct 2016 17:45:21 +0000 (19:45 +0200)]
avformat/mxfdec: Check size to avoid integer overflow in mxf_read_utf16_string()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit fecb3e82a4ba09dc11a51ad0961ab491881a53a1)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/mpegvideo_enc: Clear mmx state in ff_mpv_reallocate_putbitbuffer()
Michael Niedermayer [Fri, 21 Oct 2016 12:05:00 +0000 (14:05 +0200)]
avcodec/mpegvideo_enc: Clear mmx state in ff_mpv_reallocate_putbitbuffer()

This function must be called from the mb or slice encoding loop and MMX state may not
be clean there

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 03ec6b780cfae85b8bf0f32b2eda201063ad061b)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/utils: Clear MMX state before returning from avcodec_default_execute*()
Michael Niedermayer [Fri, 21 Oct 2016 11:40:18 +0000 (13:40 +0200)]
avcodec/utils: Clear MMX state before returning from avcodec_default_execute*()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 4f96f9d1118e073d346d16be157fa5075434e7f2)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agodoc/examples/demuxing_decoding: Drop AVFrame->pts use
Michael Niedermayer [Tue, 18 Oct 2016 02:23:33 +0000 (04:23 +0200)]
doc/examples/demuxing_decoding: Drop AVFrame->pts use

This code is not correct for git master

Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 2bd99564540a365d5b80d9aad6c19264b15955af)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoChangelog: update for recent commits
Andreas Cadhalpun [Mon, 17 Oct 2016 16:13:44 +0000 (18:13 +0200)]
Changelog: update for recent commits

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2 years agolibopenjpegenc: fix out-of-bounds reads when filling the edges
Andreas Cadhalpun [Thu, 13 Oct 2016 20:14:46 +0000 (22:14 +0200)]
libopenjpegenc: fix out-of-bounds reads when filling the edges

The calculation of width/height should round up, not round down to
prevent setting width or height to 0.

Also image->comps[compno].w is unsigned (at least in openjpeg2), so the
calculation could silently wrap around without the explicit cast to int.

Reviewed-by: Michael Bradshaw <mjbshaw@gmail.com>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit 56706ac0d5723cb549fec2602e798ab1bf6004cd)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2 years agolibopenjpegenc: stop reusing image data buffer for openjpeg 2
Andreas Cadhalpun [Thu, 13 Oct 2016 19:16:35 +0000 (21:16 +0200)]
libopenjpegenc: stop reusing image data buffer for openjpeg 2

openjpeg 2 sets the data pointers of the image components to NULL,
causing segfaults if the image is reused.

Reviewed-by: Michael Bradshaw <mjbshaw@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit 69c8505f3bf54f316e9dc8bec1c71dfa1febec63)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2 years agoconfigure: fix detection of libopenjpeg
Andreas Cadhalpun [Tue, 11 Oct 2016 18:28:35 +0000 (20:28 +0200)]
configure: fix detection of libopenjpeg

Use check_lib2 to test the header together with the function. This is
necessary, because '-DOPJ_STATIC' changes what the included header does.

Also add '-DOPJ_STATIC' to CPPFLAGS, so that it isn't necessary to
hardcode this in libavcodec/libopenjpeg{dec,enc}.c.

Finally, check for non-static openjpeg 2.1, too.

Reviewed-by: Michael Bradshaw <mjbshaw@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit 7a65aef00d113a38e0d1a54df49eead9df6aa15c)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2 years agoUpdate for 3.1.5
Michael Niedermayer [Mon, 17 Oct 2016 02:43:22 +0000 (04:43 +0200)]
Update for 3.1.5

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agodoc: fix various typos and grammar errors
Moritz Barsnick [Sun, 9 Oct 2016 18:51:57 +0000 (20:51 +0200)]
doc: fix various typos and grammar errors

Signed-off-by: Moritz Barsnick <barsnick@gmx.net>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 99d68d462fbd777cfd3fe055d4181a6f7c03fac7)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavformat/utils: Update codec_id before using it in the parser init
Michael Niedermayer [Sat, 8 Oct 2016 15:49:10 +0000 (17:49 +0200)]
avformat/utils: Update codec_id before using it in the parser init

Fixes assertion failure

Fixes: input.avi

Found-by: 连一汉 <lianyihan@360.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 987690799dd86433bf98b897aaa4c8d93ade646d)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agocmdutils: fix typos
Moritz Barsnick [Sun, 9 Oct 2016 10:57:02 +0000 (12:57 +0200)]
cmdutils: fix typos

Signed-off-by: Moritz Barsnick <barsnick@gmx.net>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 3e5d27d7a7350e096eac9f8999d02bf48c3b3a69)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agolavfi: fix typos
Moritz Barsnick [Sun, 9 Oct 2016 10:57:00 +0000 (12:57 +0200)]
lavfi: fix typos

Signed-off-by: Moritz Barsnick <barsnick@gmx.net>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit f4e4bde1f4cff99d4ec59ed361ff9228b2050e6b)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agolavc: fix typos
Moritz Barsnick [Sun, 9 Oct 2016 10:56:59 +0000 (12:56 +0200)]
lavc: fix typos

Signed-off-by: Moritz Barsnick <barsnick@gmx.net>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 3305f71025289970fb34473adce5d9c65d1af016)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agotools: fix grammar error
Moritz Barsnick [Sun, 9 Oct 2016 10:56:58 +0000 (12:56 +0200)]
tools: fix grammar error

Signed-off-by: Moritz Barsnick <barsnick@gmx.net>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit f71c98ee12f9a9e950b4a8fb6b1548fee91ba1f8)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoffmpeg: remove unused and errorneous AVFrame timestamp check
Hendrik Leppkes [Sat, 1 Oct 2016 14:15:45 +0000 (16:15 +0200)]
ffmpeg: remove unused and errorneous AVFrame timestamp check

Decoders have previously not used AVFrame.pts, and with the upcoming
deprecation of pkt_pts (in favor of pts), this would lead to an errorneous
interpration of timestamps.

(cherry picked from commit 04a3577263782cd6d70722d4ae18d75fee03dbc4)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoSupport for MIPS cpu P6600
Shivraj Patil [Fri, 5 Aug 2016 08:12:44 +0000 (13:42 +0530)]
Support for MIPS cpu P6600

Signed-off-by: Shivraj Patil <shivraj.patil@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 6803a298f4338c19c3032d2417c6e857eb6d95be)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavutil/mips/generic_macros_msa: rename macro variable which causes segfault for mips r6
Shivraj Patil [Wed, 5 Oct 2016 12:22:24 +0000 (17:52 +0530)]
avutil/mips/generic_macros_msa: rename macro variable which causes segfault for mips r6

Signed-off-by: Shivraj Patil <shivraj.patil@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit c1cc13cd2a9b8d6d2810ec42454f328a1a0d5efa)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoChangelog: update n3.1.4
Michael Niedermayer [Sat, 1 Oct 2016 00:51:42 +0000 (02:51 +0200)]
Changelog: update

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavformat/avidec: Check nb_streams in read_gab2_sub()
Michael Niedermayer [Wed, 28 Sep 2016 14:14:08 +0000 (16:14 +0200)]
avformat/avidec: Check nb_streams in read_gab2_sub()

Fixes null pointer dereference
Fixes: 1/null_point.avi

Found-by: 连一汉 <lianyihan@360.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 2679ad4773aa356e7c3da5c68bc81f02a194617f)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavformat/avidec: Remove ancient assert
Michael Niedermayer [Wed, 28 Sep 2016 13:47:12 +0000 (15:47 +0200)]
avformat/avidec: Remove ancient assert

This assert can with crafted files fail, a warning is already printed
for this case.

Fixes assertion failure
Fixes:1/assert.avi

Found-by: 连一汉 <lianyihan@360.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 14bac7e00d72eac687612d9b125e585011a56d4f)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoChangelog: update after the last few commits
James Almer [Wed, 28 Sep 2016 20:42:41 +0000 (17:42 -0300)]
Changelog: update after the last few commits

Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavfilter/vf_colorspace: fix range for output colorspace option
James Almer [Wed, 28 Sep 2016 20:24:42 +0000 (17:24 -0300)]
avfilter/vf_colorspace: fix range for output colorspace option

Rreviewed-by: BBB
Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit e4bfc9ecf73d593853ef4e993a5c753f5596aee1)

2 years agolavc/mediacodecdec_h264: fix SODB escaping
Matthieu Bouron [Tue, 6 Sep 2016 14:30:07 +0000 (16:30 +0200)]
lavc/mediacodecdec_h264: fix SODB escaping

Fixes escaping of consecutive 0x00, 0x00, 0x0{0-3} sequences.

(cherry picked from commit f574012d5fe922684a5befa16828f22fe9a83ce8)

2 years agoavcodec/nvenc: fix const options for hevc gpu setting
Timo Rothenpieler [Wed, 28 Sep 2016 14:10:49 +0000 (16:10 +0200)]
avcodec/nvenc: fix const options for hevc gpu setting

2 years agoUpdate for 3.1.4
Michael Niedermayer [Tue, 27 Sep 2016 11:44:47 +0000 (13:44 +0200)]
Update for 3.1.4

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavformat/avidec: Fix memleak with dv in avi
Michael Niedermayer [Sun, 25 Sep 2016 09:56:11 +0000 (11:56 +0200)]
avformat/avidec: Fix memleak with dv in avi

Found-by: 连一汉 <lianyihan@360.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit b98dafe04564d5fe3e5bf5073d871dd93a4a62de)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agolavc/movtextdec.c: Avoid infinite loop on invalid data.
Sasi Inguva [Wed, 28 Sep 2016 02:23:20 +0000 (19:23 -0700)]
lavc/movtextdec.c: Avoid infinite loop on invalid data.

Signed-off-by: Sasi Inguva <isasi@google.com>
(cherry picked from commit 7e9e1b7070242a79fa6e3acd749d7fe76e39ea7b)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/ansi: Check dimensions
Michael Niedermayer [Mon, 26 Sep 2016 18:25:59 +0000 (20:25 +0200)]
avcodec/ansi: Check dimensions

Fixes: 1.avi

Found-by: 连一汉 <lianyihan@360.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 69449da436169e7facaa6d1f3bcbc41cf6ce2754)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/cavsdsp: use av_clip_uint8() for idct
Michael Niedermayer [Mon, 19 Sep 2016 13:25:38 +0000 (15:25 +0200)]
avcodec/cavsdsp: use av_clip_uint8() for idct

Fixes out of array read
Fixes: 1.swf

Found-by: 连一汉 <lianyihan@360.cn>
Tested-by: 连一汉 <lianyihan@360.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 0e318f110bcd6bb8e7de9127f2747272e60f48d7)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavformat/movenc: Check packet in mov_write_single_packet() too
Michael Niedermayer [Thu, 15 Sep 2016 21:52:54 +0000 (23:52 +0200)]
avformat/movenc: Check packet in mov_write_single_packet() too

Fixes assertion failure

Found-by: durandal117
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 28343139330f557e00293933a4697c7d0fc19c56)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavformat/movenc: Factor check_pkt() out
Michael Niedermayer [Thu, 15 Sep 2016 21:52:42 +0000 (23:52 +0200)]
avformat/movenc: Factor check_pkt() out

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit deabcd2c05b2b01689d91394bbf3908da17234ed)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavformat/utils: fix timebase error in avformat_seek_file()
Xinzheng Zhang [Wed, 14 Sep 2016 08:13:45 +0000 (16:13 +0800)]
avformat/utils: fix timebase error in avformat_seek_file()

When there is only one stream and stream_index has not specified,
The ts has been transferd by the timebase of stream0 without modifying the stream_index
In this condation it cause seek failure.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit ecc04b4f2f29ac676e6c1d1ebf20ec45f5385f1e)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/g726: Add missing ADDB output mask
Michael Niedermayer [Wed, 14 Sep 2016 11:06:53 +0000 (13:06 +0200)]
avcodec/g726: Add missing ADDB output mask

Fixes: 1.poc
Fixes out of array read

Found-by: 连一汉 <lianyihan@360.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit a5af1240fce845f645440364c1335e0f8e44ee6c)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/avpacket: clear side_data_elems
Michael Niedermayer [Mon, 12 Sep 2016 11:13:42 +0000 (13:13 +0200)]
avcodec/avpacket: clear side_data_elems

Fixes null pointer dereference

Found-by: 连一汉 <lianyihan@360.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 5e1bf9d8c0d2cdbbf17b06a5dfdf87a635b3203b)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavformat/movenc: Check first DTS similar to dts difference
Michael Niedermayer [Fri, 9 Sep 2016 11:11:43 +0000 (13:11 +0200)]
avformat/movenc: Check first DTS similar to dts difference

Fixes assertion failure
Fixes: b84b53855a0b74560e64c6f45f505a13/signal_sigabrt_7ffff6ae7c37_3837_ef4e243ea5b4fa8d0becf4afe9166604.avi

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 68f4c2163ec6d4534ae1756dbcf259845f2e4d2c)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/ccaption_dec: Use simple array instead of AVBuffer
Michael Niedermayer [Fri, 9 Sep 2016 08:26:15 +0000 (10:26 +0200)]
avcodec/ccaption_dec: Use simple array instead of AVBuffer

This is simpler and fixes an out of array read, fixing it with AVBuffers
would be more complex

Fixes: e00d9e6e50e5495cc93fea41147b97bb/asan_heap-oob_12dcdbb_8798_b32a97ea722dd37bb5066812cc674552.mov

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 752e6dfa3ea97e7901870bdd9e5a51f860607240)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/svq3: Reintroduce slice_type
Michael Niedermayer [Thu, 8 Sep 2016 19:15:55 +0000 (21:15 +0200)]
avcodec/svq3: Reintroduce slice_type

Fixes out of array read
Fixes: 1642cd3962249d6aaf0eec2836023fb6/signal_sigsegv_2557a72_2995_04efaf2ff57a052f609a3b4a2ea4e622.mov

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 2d3099ad8ee67a4612633ea02c7fce10e5537579)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavformat/mov: Fix potential integer overflow in mov_read_keys
Sergey Volk [Wed, 7 Sep 2016 21:05:35 +0000 (14:05 -0700)]
avformat/mov: Fix potential integer overflow in mov_read_keys

Actual allocation size is computed as (count + 1)*sizeof(meta_keys), so
we need to check that (count + 1) won't cause overflow.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 347cb14b7cba7560e53f4434b419b9d8800253e7)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoswscale/swscale_unscaled: Try to fix Rgb16ToPlanarRgb16Wrapper() with slices
Michael Niedermayer [Sat, 3 Sep 2016 10:15:24 +0000 (12:15 +0200)]
swscale/swscale_unscaled: Try to fix Rgb16ToPlanarRgb16Wrapper() with slices

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit e57d99dd4e0d8fe2992da0d65b563580e35ce728)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoswscale/swscale_unscaled: Fix packed_16bpc_bswap() with slices
Michael Niedermayer [Fri, 2 Sep 2016 18:25:24 +0000 (20:25 +0200)]
swscale/swscale_unscaled: Fix packed_16bpc_bswap() with slices

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 47bc1bdafb0950ccf128eaa491d8fd7cc0978813)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavformat/avidec: Fix infinite loop in avi_read_nikon()
Michael Niedermayer [Fri, 2 Sep 2016 10:19:29 +0000 (12:19 +0200)]
avformat/avidec: Fix infinite loop in avi_read_nikon()

Fixes: 360/test.poc

Found-by: 连一汉 <lianyihan@360.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit e4e4a9cad7f21593d4bcb1f2404ea0d373c36c43)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavformat/utils: End probing if the expected codec surpasses AVPROBE_SCORE_STREAM_RETRY
Michael Niedermayer [Fri, 26 Aug 2016 23:12:49 +0000 (01:12 +0200)]
avformat/utils: End probing if the expected codec surpasses AVPROBE_SCORE_STREAM_RETRY

Fixes Ticket5800

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit c75273310cf1becffee79bab0e2bba0b1606afb7)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agolavf/utils: Avoid an overflow for huge negative durations.
Carl Eugen Hoyos [Sat, 24 Sep 2016 11:07:39 +0000 (13:07 +0200)]
lavf/utils: Avoid an overflow for huge negative durations.

Fixes ticket #5135.
(cherry picked from commit 267da70ea8c36caaa645a3c4f1c5f0ca8bae156a)

2 years agoavformat/hls: Fix handling of EXT-X-BYTERANGE streams over 2GB
Anssi Hannula [Sat, 24 Sep 2016 06:29:03 +0000 (09:29 +0300)]
avformat/hls: Fix handling of EXT-X-BYTERANGE streams over 2GB

Replace uses of atoi() with strtoll() when trying to read values into
int64_t variables.

Fixes Kodi trac #16926:
http://trac.kodi.tv/ticket/16926

(cherry picked from commit a6f5e25ad989550dff9493311d6ba08d882df079)

2 years agolavc/avpacket: Fix undefined behaviour, do not pass a null pointer to memcpy().
Carl Eugen Hoyos [Wed, 21 Sep 2016 23:03:55 +0000 (01:03 +0200)]
lavc/avpacket: Fix undefined behaviour, do not pass a null pointer to memcpy().

Fixes ticket #5857.
(cherry picked from commit c54eef46f990722ed65fd1ad1da3d0fc50806eb5)

2 years agolavc/mjpegdec: Do not skip reading quantization tables.
Carl Eugen Hoyos [Fri, 2 Sep 2016 15:10:57 +0000 (17:10 +0200)]
lavc/mjpegdec: Do not skip reading quantization tables.

They may contain 0xFFs, confusing the start code finding algorithm.

Fixes ticket #5819.
(cherry picked from commit cef5bc0e6e2320d3903cf063d59cef83e91dbc3c)

2 years agocmdutils: fix implicit declaration of SetDllDirectory function
Tobias Rapp [Mon, 29 Aug 2016 13:25:58 +0000 (15:25 +0200)]
cmdutils: fix implicit declaration of SetDllDirectory function

Pre-processor check changed by commiter.

Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoChangelog: update after last commit n3.1.3
James Almer [Wed, 24 Aug 2016 23:43:33 +0000 (20:43 -0300)]
Changelog: update after last commit

Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoexamples/demuxing_decoding: convert to codecpar
James Almer [Wed, 10 Aug 2016 15:31:16 +0000 (12:31 -0300)]
examples/demuxing_decoding: convert to codecpar

Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit bba6a03b2816d805d44bce4f9701a71f7d3f8dad)

2 years agoUpdate for 3.1.3
Michael Niedermayer [Thu, 25 Aug 2016 01:35:17 +0000 (03:35 +0200)]
Update for 3.1.3

2 years agoavcodec/exr: Check tile positions
Michael Niedermayer [Wed, 17 Aug 2016 19:22:29 +0000 (21:22 +0200)]
avcodec/exr: Check tile positions

This also disabled the case of mixed x/ymin with tiles, the code
handles these cases inconsistent for the 2 coordinate axis and is
unlikely working correctly.

Fixes crash
Fixes: poc1.exr, poc2.exr

Found-by: Yaoguang Chen of Aliapy unLimit Security Team
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 01aee8148d4fa439cce678a11f5110656c98de1f)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/aacenc: Tighter input checks
Michael Niedermayer [Tue, 23 Aug 2016 09:00:29 +0000 (11:00 +0200)]
avcodec/aacenc: Tighter input checks

Fixes occurance of NaN/Inf leading to assertion failures and out of array access
Fixes: d1c38a09acc34845c6be3a127a5aacaf/signal_sigsegv_3982225_6121_d18bd5451d4245ee09408f04badd1b83.wmv

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 77bf96b04710b98a52aaddb93bfd32da0d506191)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavformat/wtvdec: Check pointer before use
Michael Niedermayer [Sun, 21 Aug 2016 19:30:36 +0000 (21:30 +0200)]
avformat/wtvdec: Check pointer before use

Fixes out of array read
Fixes: 049fdf78565f1ce5665df236d90f8657/asan_heap-oob_10a5a97_1026_42f9d4855547329560f385768de2f3fb.wtv

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit cc5e5548df4af48674c7aef518e831b19e99f9fc)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agolibavcodec/wmalosslessdec: Check the remaining bits
Michael Niedermayer [Sun, 21 Aug 2016 18:30:34 +0000 (20:30 +0200)]
libavcodec/wmalosslessdec: Check the remaining bits

Fixes assertion failure
Fixes: 24ebfda03228b5cc1ef792608cfba458/signal_sigabrt_7ffff6ae7c37_6473_3fa8a111dbc752b1a7c411c5ab79aaa4.wma

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 67318187fbba382d887f9581dde48a50842f1bea)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/adpcm: Fix adpcm_ima_wav padding
Michael Niedermayer [Sat, 20 Aug 2016 23:42:20 +0000 (01:42 +0200)]
avcodec/adpcm: Fix adpcm_ima_wav padding

Fixes out of array read
Fixes: f29f134ea5f5590df554a7733294a587/asan_stack-oob_309d14e_9188_ea01743d6355aff20530f3d4cdaa841a.wav

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit f2a9a30fd6a2914197ae42ee67703a1471fac2eb)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/svq3: fix slice size check
Michael Niedermayer [Sat, 20 Aug 2016 20:09:54 +0000 (22:09 +0200)]
avcodec/svq3: fix slice size check

Fixes out of array read
Fixes: 09f46aa2175cade93e3e3932646a56a9/asan_heap-oob_4a5385_2995_498f6abfdc0248288cefe5f4b7ad316c.mov

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 2624695484cde26baedac10192856ebfd97f2cc7)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/diracdec: Check numx/y
Michael Niedermayer [Sat, 20 Aug 2016 17:21:07 +0000 (19:21 +0200)]
avcodec/diracdec: Check numx/y

Fixes division by 0
Fixes: 60261c4469ba3e11059890fb2832a515/asan_generic_135e694_2790_beb94eaa0aeb7d11c0437375a8964a99.drc

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit a31e08fa1aa5c5f0518b8af850f28eb945268e66)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/h2645_parse: fix nal size
Michael Niedermayer [Fri, 19 Aug 2016 21:54:28 +0000 (23:54 +0200)]
avcodec/h2645_parse: fix nal size

Found-by: <durandal_1707>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 15dd56c093be480e719d7bbc39f8dbddb586694d)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/h2645_parse: Use get_nalsize() in ff_h2645_packet_split()
Michael Niedermayer [Fri, 19 Aug 2016 22:39:07 +0000 (00:39 +0200)]
avcodec/h2645_parse: Use get_nalsize() in ff_h2645_packet_split()

This fixes several regressions in h.264

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 528171ba84b24830b74d9c19dd957ac3609f7270)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoh2645_parse: only read avc length code at the correct position
Hendrik Leppkes [Thu, 7 Jul 2016 18:18:26 +0000 (20:18 +0200)]
h2645_parse: only read avc length code at the correct position

Reading it from any other position would result in a wrong size being
read, instead fallback to the re-sync mechanic in the else clause.

(cherry picked from commit c3e9b098e12b8932693361625d4a69bc30583d9a)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoh2645_parse: don't overread AnnexB NALs within an avc stream
Hendrik Leppkes [Thu, 7 Jul 2016 18:19:51 +0000 (20:19 +0200)]
h2645_parse: don't overread AnnexB NALs within an avc stream

We know the maximum size of an AnnexB NAL, signaling it as the maximum
NAL size allows ff_h2645_extract_rbsp to determine the correct size.

(cherry picked from commit 83a940e7fb9640954d631870e2ec6e8b3fc528ed)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/h264_parser: Factor get_avc_nalsize() out
Michael Niedermayer [Fri, 19 Aug 2016 22:36:38 +0000 (00:36 +0200)]
avcodec/h264_parser: Factor get_avc_nalsize() out

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit f10ea03df3dd1c15e3a957ca0aba528251438a79)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/cfhd: Increase minimum band dimension to 3
Michael Niedermayer [Fri, 19 Aug 2016 19:34:38 +0000 (21:34 +0200)]
avcodec/cfhd: Increase minimum band dimension to 3

The implementation does not currently support len=2

Fixes out of array accesses
Fixes: 29d1b3db5ba2205e82b0b3a533e057a3/asan_heap-oob_12b650c_9254_3b8c4e4d931eb2c32841c18ebb297f1d.avi

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit b8b36717217c6f45db71c77ad4e7c65521e7d9ff)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/indeo2: check ctab
Michael Niedermayer [Fri, 19 Aug 2016 11:07:14 +0000 (13:07 +0200)]
avcodec/indeo2: check ctab

Fixes out of array access
Fixes: 6b73fa392ac808f02e95a4e0a5770026/asan_static-oob_1b15f9a_1969_e7778535e5f27225fe0d6ded14721430.AVI

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 9ffe44c5c75c485b4cbb12751e228f18da219df3)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavformat/swfdec: Fix inflate() error code check
Michael Niedermayer [Fri, 19 Aug 2016 08:28:22 +0000 (10:28 +0200)]
avformat/swfdec: Fix inflate() error code check

Fixes infinite loop
Fixes endless.poc

Found-by: 连一汉 <lianyihan@360.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit a453bbb68f3eec202673728988bba3bc76071761)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/rawdec: Fix bits_per_coded_sample checks
Michael Niedermayer [Fri, 19 Aug 2016 00:07:22 +0000 (02:07 +0200)]
avcodec/rawdec: Fix bits_per_coded_sample checks

Fixes assertion failure
Fixes: 9eb9cf5b8c26dd0fa7107ed0348dcc1f/signal_sigabrt_7ffff6ae7c37_8926_4609a5c3f071d555d2d557625f9687b1.swf

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 237207645b36fb79759d313c0399ee93ba467b9d)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agovcodec/h2645_parse: Clear buffer padding
Michael Niedermayer [Thu, 18 Aug 2016 20:23:32 +0000 (22:23 +0200)]
vcodec/h2645_parse: Clear buffer padding

Fixes use of uninitialized memory
Fixes: 044100cb22845944988a4bd821ff8074/asan_heap-oob_329927a_1366_c3de34ce9217dac820fbb46171031bbb.jsv

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 382a68b0088b06b8df20d0133d767d53d8f161ef)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/h2645: Fix NAL unit padding
Michael Niedermayer [Thu, 18 Aug 2016 18:41:31 +0000 (20:41 +0200)]
avcodec/h2645: Fix NAL unit padding

The parser changes have lost the support for the needed padding, this adds it back
Fixes out of array reads
Fixes: 03ea21d271abc8acf428d42ace51d8b4/asan_heap-oob_3358eef_5692_16f0cc01ab5225e9ce591659e5c20e35.mkv

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit cc13bc8c4f0f4afa30d0b94c3f3a369ccd2aaf0b)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavfilter/drawutils: Fix single plane with alpha
Michael Niedermayer [Tue, 9 Aug 2016 10:22:15 +0000 (12:22 +0200)]
avfilter/drawutils: Fix single plane with alpha

Fixes Ticket5720

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 369ed11e3c8acc08db39fb2ed4e980a918cab61e)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agocmdutils: check for SetDllDirectory() availability
James Almer [Mon, 22 Aug 2016 22:25:50 +0000 (19:25 -0300)]
cmdutils: check for SetDllDirectory() availability

It's only available on Windows XP or newer.

Should fix compilation with mingw32 using the default OS target.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoUpdate for 3.1.2 n3.1.2
Michael Niedermayer [Mon, 8 Aug 2016 19:42:18 +0000 (21:42 +0200)]
Update for 3.1.2

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agocmdutils: remove the current working directory from the DLL search path on win32
Hendrik Leppkes [Mon, 8 Aug 2016 13:27:41 +0000 (15:27 +0200)]
cmdutils: remove the current working directory from the DLL search path on win32

Reviewed-by: Matt Oliver <protogonoi@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 3bf142c77337814458ed8e036796934032d9837f)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavcodec/rawdec: Fix palette handling with changing palettes
Michael Niedermayer [Thu, 4 Aug 2016 10:26:41 +0000 (12:26 +0200)]
avcodec/rawdec: Fix palette handling with changing palettes

Fixes out of array access

Fixes: poc.swf
Found-by: 连一汉 <lianyihan@360.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 6aa39080ccea2b60433e920417844c3a3c0da50b)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavcodec/raw: Fix decoding of ilacetest.mov
Michael Niedermayer [Sun, 7 Aug 2016 14:27:31 +0000 (16:27 +0200)]
avcodec/raw: Fix decoding of ilacetest.mov

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit bbec14de3126dbc4e1ec2b32ed714dab173386aa)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavformat/mov: Enable mp3 parsing if a packet needs it
Michael Niedermayer [Sat, 16 Jul 2016 21:27:54 +0000 (23:27 +0200)]
avformat/mov: Enable mp3 parsing if a packet needs it

Fixes Ticket5689

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 803c058a6f0c835c3094621d03d6e8c02565f28e)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavformat/hls: Use an array instead of stream offset for stream mapping
Anssi Hannula [Wed, 27 Jul 2016 20:29:16 +0000 (23:29 +0300)]
avformat/hls: Use an array instead of stream offset for stream mapping

This will be useful when the amount of streams per subdemuxer is not
known at hls_read_header time in a following commit.

(cherry picked from commit 9884f17e343b37aef442fafa05bd0113cdf47087)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavformat/hls: Sync starting segment across variants on live streams
Anssi Hannula [Wed, 27 Jul 2016 19:52:44 +0000 (22:52 +0300)]
avformat/hls: Sync starting segment across variants on live streams

This will avoid a large time difference between variants in the most
common case.

(cherry picked from commit 4d85069e5dff37e4a9904767242b47e14cf62a9c)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavformat/hls: Fix regression with ranged media segments
Anssi Hannula [Tue, 26 Jul 2016 12:18:40 +0000 (15:18 +0300)]
avformat/hls: Fix regression with ranged media segments

Commit 81306fd4bdf ("hls: eliminate ffurl_* usage", merged in d0fc5de3a6)
changed the hls demuxer to use AVIOContext instead of URLContext for its
HTTP requests.

HLS demuxer uses the "offset" option of the http demuxer, requesting
the initial file offset for the I/O (http URLProtocol uses the "Range:"
HTTP header to try to accommodate that).

However, the code in libavformat/aviobuf.c seems to be doing its own
accounting for the current file offset (AVIOContext.pos), with the
assumption that the initial offset is always zero.

HLS demuxer does an explicit seek after open_url to account for cases
where the "offset" was not effective (due to the URL being a local file
or the HTTP server not obeying it), which should be a no-op in case the
file offset is already at that position.

However, since aviobuf.c code thinks the starting offset is 0, this
doesn't work properly.

This breaks retrieval of ranged media segments.

To fix the regression, just drop the seek call from the HLS demuxer when
the HTTP(S) protocol is used.

(cherry picked from commit 9cb30f7a880578e995becbd8bf9ffb69788e09a2)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavcodec/ffv1enc: Fix assertion failure with non zero bits per sample
Michael Niedermayer [Fri, 5 Aug 2016 23:53:30 +0000 (01:53 +0200)]
avcodec/ffv1enc: Fix assertion failure with non zero bits per sample

Fixes Ticket5736
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit c1bfeda5a34631787e07702f7a3569a41751caeb)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavfilter/af_hdcd: small fix in af_hdcd.c where gain was not being adjusted for "atten...
Burt P [Mon, 4 Jul 2016 19:16:54 +0000 (14:16 -0500)]
avfilter/af_hdcd: small fix in af_hdcd.c where gain was not being adjusted for "attenuate slowly"

Signed-off-by: Burt P <pburt0@gmail.com>
Taken from ba69a81019a2642969b108c39e3bea7d2f8ffbfa
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavformat/oggdec: Fix integer overflow with invalid pts
Michael Niedermayer [Wed, 3 Aug 2016 11:34:40 +0000 (13:34 +0200)]
avformat/oggdec: Fix integer overflow with invalid pts

If negative pts are possible for some codecs in ogg then the code needs to be
changed to use signed values.

Found-by: Thomas Guilbert <tguilbert@google.com>
Fixes: clusterfuzz_usan-2016-08-02
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit c5cc3b08e56fc95665977544486bd9f06e4b7a72)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoffplay: Fix invalid array index
Michael Niedermayer [Wed, 3 Aug 2016 11:15:14 +0000 (13:15 +0200)]
ffplay: Fix invalid array index

Found-by: Thomas Guilbert <tguilbert@google.com>
Fixes: clusterfuzz_usan-2016-08-02
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 6cd9a8b67a95a136ea15bfe3c3bab6cf5e6d1cc9)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavcodec/alacenc: allocate bigger packets
Paul B Mahol [Fri, 29 Jul 2016 13:05:52 +0000 (15:05 +0200)]
avcodec/alacenc: allocate bigger packets
(cherry picked from commit 82b84c71b009884c8d041361027718b19922c76d)

3 years agolibavcodec/dnxhd: Enable 12-bit DNxHR support.
Steven Robertson [Tue, 2 Aug 2016 06:26:12 +0000 (23:26 -0700)]
libavcodec/dnxhd: Enable 12-bit DNxHR support.

10- and 12-bit DNxHR use the same DC coefficient decoding process and
VLC table, just with a different shift value. From SMPTE 2019-1:2016,
8.2.4 DC Coefficient Decoding:

"For 8-bit video sampling, the maximum value of η=11 and for
10-/12-bit video sampling, the maximum value of η=13."

A sample file will be uploaded to show that with this patch, things
decode correctly:
dnxhr_hqx_12bit_1080p_smpte_colorbars_davinci_resolve.mov

Signed-off-by: Steven Robertson <steven@strobe.cc>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit e1be80aa11cca765881d04f21119487db53c4ffa)

3 years agolavc/vaapi_encode_h26x: Fix a crash if "." is not the decimal separator.
Carl Eugen Hoyos [Tue, 2 Aug 2016 17:02:09 +0000 (19:02 +0200)]
lavc/vaapi_encode_h26x: Fix a crash if "." is not the decimal separator.

Fixes Debian bugs #831529, #831909, #832964.

Signed-off-by: Mark Thompson <sw@jkqxz.net>
(cherry picked from commit 82e53b3cef924f250f928fca6348204e2ace90d8)

3 years agojni: Return ENOSYS on unsupported platforms
Timothy Gu [Wed, 3 Aug 2016 03:47:55 +0000 (20:47 -0700)]
jni: Return ENOSYS on unsupported platforms

3 years agolavu/hwcontext_vaapi: Fix compilation if VA_FOURCC_ABGR is not defined.
Carl Eugen Hoyos [Tue, 2 Aug 2016 15:07:41 +0000 (17:07 +0200)]
lavu/hwcontext_vaapi: Fix compilation if VA_FOURCC_ABGR is not defined.

Fixes ticket #5484.
(cherry picked from commit 5aede051202150a1904c0f07a5c7901f402395a5)

3 years agoavcodec/vp9_parser: Check the input frame sizes for being consistent
Michael Niedermayer [Mon, 1 Aug 2016 11:50:21 +0000 (13:50 +0200)]
avcodec/vp9_parser: Check the input frame sizes for being consistent

Suggested-by: BBB
Fixed-by: BBB
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 77b0f3f26d33d4f46f274896e0583ad1f5936b7c)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavformat/flvdec: parse keyframe before a\v stream was created add_keyframes_index...
Xinzheng Zhang [Wed, 27 Jul 2016 04:21:25 +0000 (12:21 +0800)]
avformat/flvdec: parse keyframe before a\v stream was created add_keyframes_index() when stream created or keyframe parsed

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit ad14aab3b4f88cdb6c2a3f8877c578e5a8042f1d)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavformat/flvdec: splitting add_keyframes_index() out from parse_keyframes_index()
Xinzheng Zhang [Wed, 27 Jul 2016 04:21:24 +0000 (12:21 +0800)]
avformat/flvdec: splitting add_keyframes_index() out from parse_keyframes_index()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit cd141e71bd3441ac9b7b720b934b7d4d85a75355)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agolibavformat/rtpdec_asf: zero initialize the AVIOContext struct
Kacper Michajłow [Sat, 23 Jul 2016 21:47:39 +0000 (23:47 +0200)]
libavformat/rtpdec_asf: zero initialize the AVIOContext struct

This fixes crash in avformat_open_input() when accessing
protocol_whitelist field.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit e947b75b1c76ef6793209c2c445b8c224a28717a)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agolibavutil/opt: Small bugfix in example.
Kacper Michajłow [Sat, 23 Jul 2016 19:43:06 +0000 (21:43 +0200)]
libavutil/opt: Small bugfix in example.

Fix const corectness and zero init the struct. This example code would actually crash when initializing string.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 69630f4d304a4e35d90957d6a170744af87cbf93)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agolibx264: Increase x264 opts character limit to 4096
Sasi Inguva [Fri, 22 Jul 2016 01:52:41 +0000 (18:52 -0700)]
libx264: Increase x264 opts character limit to 4096

Signed-off-by: Sasi Inguva <isasi@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 282477bf4534439ecb06f14d46446a4f1ab82284)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavcodec/h264_parser: Set sps/pps_ref
Michael Niedermayer [Sat, 2 Jul 2016 01:06:27 +0000 (03:06 +0200)]
avcodec/h264_parser: Set sps/pps_ref

Fixes use of freed memory
Should fix valgrind failures of fate-h264-skip-nointra

Found-by: logan
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit febc862b53c090e530b943ebd873747addf5f913)

Conflicts:

libavcodec/h264_parser.c

3 years agolibrtmp: Avoid an infiniloop setting connection arguments
Luca Barbato [Wed, 22 Jun 2016 04:36:31 +0000 (06:36 +0200)]
librtmp: Avoid an infiniloop setting connection arguments

The exit condition was missing.

Signed-off-by: Timothy Gu <timothygu99@gmail.com>
(cherry picked from commit e85d38c20a8893cb59d7c86f74481f2497882196)
Signed-off-by: Timothy Gu <timothygu99@gmail.com>
3 years agoavformat/oggparsevp8: fix pts calculation on pages ending with an invisible frame
James Almer [Tue, 12 Jul 2016 20:05:42 +0000 (17:05 -0300)]
avformat/oggparsevp8: fix pts calculation on pages ending with an invisible frame

Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit 5adfbd391847fcdaea1e9b105fae2dd90af2a733)

3 years agolavc/Makefile: Fix standalone compilation of the svq3 decoder.
Carl Eugen Hoyos [Sun, 24 Jul 2016 21:50:33 +0000 (23:50 +0200)]
lavc/Makefile: Fix standalone compilation of the svq3 decoder.

Regression since 0bf5fd2e
(cherry picked from commit 71167f7f8434341b3f76da68a10923b6525e2e87)

3 years agolavf/vplayerdec: Improve auto-detection.
Clément Bœsch [Fri, 15 Jul 2016 08:29:14 +0000 (10:29 +0200)]
lavf/vplayerdec: Improve auto-detection.

Fixes the incorrect detection of 16_selma_OneFrame_QP39.yuv (gray16le
rawvideo) as vplayer format.
(cherry picked from commit 77726d32a872ad500434fd8799b289cf56215047)