summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
...
* avcodec/mjpegdec: Remove redundant initializationAndreas Rheinhardt2020-10-09
| | | | | | | | | Now that the correct number of codes is used, it is no longer necessary to initialize the lengths of the codes at all any more as the length of the actually used codes is set later anyway. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/mjpegdec: Remove use_static from build_vlc()Andreas Rheinhardt2020-10-09
| | | | | | | | | It is always zero; it referred to the INIT_VLC_USE_STATIC flag which has been removed in 595324e143b57a52e2329eb47b84395c70f93087. Reviewed-by: Paul B Mahol <onemda@gmail.com> Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/libopenmpt: Don't discard constAndreas Rheinhardt2020-10-08
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/mjpegdec: Use correct number of codes when init default VLCsAndreas Rheinhardt2020-10-08
| | | | | | | | | | | | | | | | | | | | | | | | | Commit bbc0d0c1fe2b7ecdc4367295594f084f85ad22f5 made the mjpeg decoder use default Huffman tables when none are given, yet when initializing the default Huffman tables, it did not use the correct number of entries of the arrays used to initialize the tables, but instead it used the biggest entry + 1 (as if it were a continuous array 0..biggest entry). This worked because the ff_init_vlc_sparse() (and its predecessors) always skipped entries with a length of zero and the length of the corresponding elements was always initialized to zero with only the sizes of the actually existing elements being set to a size > 0 lateron. Yet since commit 1249698e1b424cff8e77e6a83cfdbc9d11e01aa7 this is no longer so, as build_vlc() actually read the array containing the values itself. This implies that the wrong length now leads to a read beyond the end of the given array; this could lead to crashs (but usually doesn't); it is detectable by ASAN* and this commit fixes it. *: AddressSanitizer: global-buffer-overflow on address xy ... xy is located 0 bytes to the right of global variable 'avpriv_mjpeg_val_ac_luminance' Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/mjpegdec: Use correct number of codes for VLC tablesAndreas Rheinhardt2020-10-08
| | | | | | | | | | | | | | | | | | Commit 1249698e1b424cff8e77e6a83cfdbc9d11e01aa7 made ff_mjpeg_decode_dht() call build_vlc() with a wrong (too hight) number of codes. The reason it worked is that the lengths of the extraneous entries is initialized to zero and ff_init_vlc_sparse() ignores codes with a length of zero. But using a too high number of codes was nevertheless bad, because a) the assert in build_vlc() could have been triggered (namely if the real amount of codes is 256) and b) the loop in build_vlc() uses initialized data (leading to Valgrind errors [1]). Furthermore, the old code spend CPU cycles in said loop although the result won't be used anyway. [1]: http://fate.ffmpeg.org/report.cgi?slot=x86_64-archlinux-gcc-valgrind&time=20201008025137 Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* VP9 Profile 2 VDPAU supportManojGuptaBonda2020-10-08
| | | | | | | Added VDPAU to list of supported formats for VP9 420 10 and 12 bit formats. Add VP9 10/12 Bit support for VDPAU Signed-off-by: Philip Langdale <philipl@overt.org>
* avformat/dashdec: Reset pointer to NULL after freeing itAndreas Rheinhardt2020-10-08
| | | | | | | | | | This is currently safe here, because the effective lifetime of adaptionset_lang is parse_manifest_adaptationset() (i.e. the pointer gets overwritten each time on entry to the function and gets freed before exiting the function), but it is nevertheless safer to reset the pointer. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* configure: add missing atsc_a53 dependencies to hevcparse and h264_parserJames Almer2020-10-08
| | | | | Found-by: Chris Miceli <chris@miceli.net.au> Signed-off-by: James Almer <jamrial@gmail.com>
* libavformat/dashdec: Fix issue with dash on WindowsChristopher Degawa2020-10-08
| | | | | | | | | | | | | | | | | | Use xmlFree instead of av_freep snip from libxml2: * xmlGetProp: ... * Returns the attribute value or NULL if not found. * It's up to the caller to free the memory with xmlFree(). According to libxml2, you are supposed to use xmlFree instead of free on the pointer returned by it, and also using av_freep on Windows will call _aligned_free instead of normal free, causing _aligned_free to raise SIGTRAP and crashing ffmpeg and ffplay. Signed-off-by: Christopher Degawa <ccom@randomderp.com>
* lavf/img2dec: Auto-detect Cintel scanner images.Carl Eugen Hoyos2020-10-08
|
* avcodec/mjpegdec: improve decoding of DNG filesPaul B Mahol2020-10-07
| | | | That have unused symbols coded in DHT.
* avcodec/tiff: do not abort decoding if strips are availablePaul B Mahol2020-10-07
| | | | | | Even if such files are invalid, they can be decoded just fine. Also stored tiles may have bigger dimensions than displayed ones, so do not abort decoding in such cases.
* avcodec: add Cintel RAW decoderPaul B Mahol2020-10-07
|
* avfilter/vf_v360: use quaternions for rotationPaul B Mahol2020-10-07
| | | | Fixes gimbal lock issues, and round-off errors.
* libswcale/input: use more accurate planer rgb16 yuv conversionsMark Reid2020-10-06
| | | | | | | These conversion appears to be exhibiting the same rounding error as the rgbf32 formats where. I seperated the rounding value from the 16 and 128 offsets, I think it makes it a little more clear. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/av1dec: avoid probing with av1decJames Almer2020-10-06
| | | | | | | | av1dec should no longer attempt to output empty frames if another decoder was used for probing and it sucessfully set a pix_fmt ever since 05872c67a4, so we can re-add the AV_CODEC_CAP_AVOID_PROBING cap. Signed-off-by: James Almer <jamrial@gmail.com>
* lavf/avs2dec.c: optimize code stylehwren2020-10-06
| | | | Signed-off-by: hwren <hwrenx@126.com>
* lavc/avs2_parser.c: optimize code stylehwren2020-10-06
| | | | Signed-off-by: hwren <hwrenx@126.com>
* lavf/davs2.c: rename as avs2dec.c for better understandinghwren2020-10-06
| | | | Signed-off-by: hwren <hwrenx@126.com>
* lavc/avs2_parser.c,lavf/davs2.c: add AVS2_* prefixhwren2020-10-06
| | | | | | Add AVS2_* prefix to macro definitions to avoid confusion Signed-off-by: hwren <hwrenx@126.com>
* lavc,doc: add libuavs3d video decoder wrapperhwren2020-10-06
| | | | | Signed-off-by: hbj <hanbj@pku.edu.cn> Signed-off-by: hwren <hwrenx@126.com>
* lavf/avs3dec: add raw avs3 demuxerhwren2020-10-06
| | | | | Signed-off-by: hbj <hanbj@pku.edu.cn> Signed-off-by: hwren <hwrenx@126.com>
* lavc/avs3_parser: add avs3 parserhwren2020-10-05
| | | | | Signed-off-by: hbj <hanbj@pku.edu.cn> Signed-off-by: hwren <hwrenx@126.com>
* lavc/avs3.h: add AVS3 related definitionshwren2020-10-05
| | | | Signed-off-by: hwren <hwrenx@126.com>
* lavc: add AVS3 codec id and deschwren2020-10-05
| | | | | Signed-off-by: hbj <hanbj@pku.edu.cn> Signed-off-by: hwren <hwrenx@126.com>
* avcodec/h264_slice: use av_buffer_replace() to simplify codeJames Almer2020-10-05
| | | | | | | Based on eff289ce9f030f023e218ee7ce354d4f0e035b6d. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/movenc: Avoid allocation for timecode trackAndreas Rheinhardt2020-10-05
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/movenc: Don't forget to free fragment buffersAndreas Rheinhardt2020-10-05
| | | | | | | | | | The buffers used when fragmented output is enabled have up until now not been freed in the deinit function; they leak e.g. if one errors out of mov_write_trailer() before one reaches the point where they are normally written out and freed. This can e.g. happen if allocating new vos_data fails at the beginning of mov_write_trailer(). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/movenc: Free old vos_data before overwriting itAndreas Rheinhardt2020-10-05
| | | | | | | | Otherwise the old data leaks whenever extradata needs to be rewritten (e.g. when encoding FLAC with our encoder that sends an updated extradata packet at the end). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/movenc: Don't free AVCodecParameters manuallyAndreas Rheinhardt2020-10-05
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/qsv: Fix leak of options on errorAndreas Rheinhardt2020-10-05
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/movenc: Make some AVCodecTag tables staticAndreas Rheinhardt2020-10-04
| | | | | | They are not used anywhere else. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/movenc: Fix segfault when remuxing rtp hint streamAndreas Rheinhardt2020-10-04
| | | | | | | | | | | | | | | | When remuxing an rtp hint stream (or any stream with the tag "rtp "), the mov muxer treats this as one of the rtp hint tracks it creates internally when ordered to do so; yet this track lacks the AVFormatContext for the hinting rtp muxer, leading to segfaults in mov_write_udta_sdp() if a "trak" atom is written for this stream; if not, the stream's codecpar is freed by mov_free() as if the mov muxer owned it (it does for the internally created "rtp " tracks), but without resetting st->codecpar, leading to double-frees lateron. This commit therefore ignores said tag which makes rtp hint streams unremuxable. This fixes tickets #8181 and #8186. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/dvenc: Fix undefined left shift of negative numbersAndreas Rheinhardt2020-10-04
| | | | | | | | | The earlier code was based on the assumption that AVFrame.linesize can not be negative. Fixes ticket #8280. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avfilter/vf_v360: fix possible out of range valuesPaul B Mahol2020-10-04
|
* avfilter/vf_v360: add mitchell interpolationPaul B Mahol2020-10-04
|
* avformat/moflex: Check m->size before seekingMichael Niedermayer2020-10-04
| | | | | | | | | Fixes: Infinite loop Fixes: 26016/clusterfuzz-testcase-minimized-ffmpeg_IO_DEMUXER_fuzzer-6195663833137152 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/dxtory: Fix negative stride shift in dx2_decode_slice_420()Michael Niedermayer2020-10-04
| | | | | | | | | Fixes: left shift of negative value -640 Fixes: 26044/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DXTORY_fuzzer-5631057602543616 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/av1dec: partially clean state on frame decoding errorsJames Almer2020-10-04
| | | | | | | | Fixes: member access within null pointer of type 'TileGroupInfo' (aka 'struct TileGroupInfo') Fixes: 25725/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AV1_fuzzer-5166692706287616 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: James Almer <jamrial@gmail.com>
* avformat: add tri-ACE demuxerPaul B Mahol2020-10-03
|
* avformat/adxdec: demux multiple blocks at oncePaul B Mahol2020-10-03
| | | | Improves decoding speed by 24x
* libwavpackenc: remove libwavpackenc wrapperLynne2020-10-02
| | | | | | | | | The manual states "there is virtually no reason to use that encoder.". It supports less sample formats than the native encoder, is less efficient than the native encoder and is also slower and pretty much remains untested. libwavpack also isn't being fuzzed, which given that we plug the parameters without any sanitizing them looks concerning.
* avformat/movenc: handle tracks w/o AVStreams in calculate_mpeg4_bit_ratesJan Ekström2020-10-02
| | | | | | | The generated text streams for chapters lack an AVStream since they are but an internal concept within movenc. Fixes #8910
* avformat/asfdec_f: Change order or operations slightlyMichael Niedermayer2020-10-02
| | | | | | | | Fixes: signed integer overflow: 20 * 5184056935931942919 cannot be represented in type 'long' Fixes: 25466/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-4798660247552000 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/dxa: Use av_rescale() for duration computationMichael Niedermayer2020-10-02
| | | | | | | | Fixes: signed integer overflow: 8224000000 * 1629552639 cannot be represented in type 'long' Fixes: 24908/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-4658478506049536 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/vc1_block: Fix integer overflow in ac valueMichael Niedermayer2020-10-02
| | | | | | | | Fixes: signed integer overflow: 25488 * 87381 cannot be represented in type 'int' Fixes: 24765/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VC1_fuzzer-5108259565076480 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* libswcale/input: use more accurate rgbf32 yuv conversionsMark Reid2020-10-02
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* libswscale/tests: add floatimg_cmp testMark Reid2020-10-02
| | | | | | | | | | changes since v1: - made into fate test - fixed c90 warnings - tests more intermediate formats - tested on BE mips too Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/rtsp: fix parse_rtsp_messageZhao Zhili2020-10-02
| | | | | | | 1. Remove the assumption that the message method is TEARDOWN. 2. Don't ignore the error code of ff_rtsp_parse_streaming_commands. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtsp: Fix infinite loop in listen mode with UDP transportMartin Storsjö2020-10-02
| | | | | | | | | | | | | | | | | | | | | | In listen mode with UDP transport, once the sender has sent the TEARDOWN and closed the connection, poll will indicate that one can read from the connection (indicating that the socket has reached EOF and should be closed by the receiver as well). In this case, parse_rtsp_message won't try to parse the command (because it's no longer in state STREAMING), but previously just returned zero. Prior to f6161fccf8c5720ceac1ed1df8ba60ff8fed69f5, this caused udp_read_packet to return zero, which is treated as EOF by read_packet. But after that commit, udp_read_packet would continue if parse_rtsp_message didn't return an explicit error code. To keep the original behaviour from before that commit, more explicitly return an error in parse_rtsp_message when in the wrong state. Fixes: #8840 Signed-off-by: Martin Storsjö <martin@martin.st>