summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* avcodec/bitpacked_enc: suppport for frame thread encodeLimin Wang2021-12-09
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec/bitpacked_dec: support for frame thread decodeLimin Wang2021-12-09
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec/bitpacked_dec: setting pict_type and key_frame after decode()Limin Wang2021-12-09
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec/bitpacked_dec: remove AV_CODEC_CAP_EXPERIMENTAL capabilitiesLimin Wang2021-12-09
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec/movtextdec: Sanitize style entriesAndreas Rheinhardt2021-12-08
| | | | | | | | | | | | | | | | | | | | | There are three types of style entries which are redundant: a) Entries with length zero. They are already discarded. b) Entries that are equivalent to the default style: They can be safely discarded. c) Entries that are equivalent to the immediately preceding style if the start of the current style coincides with the end of the preceding style. In this case the styles can be merged. This commit implements discarding/merging in cases b) and c). This fixes ticket #9548. In said ticket each packet contained exactly one style entry that covered the complete packet with the exception of the last character (probably created by a tool that didn't know that the style's end is exclusive). Said style coincided with the default style, leading to a superfluous reset, which is now gone. Reviewed-by: Philip Langdale <philipl@overt.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/movtextdec: Perform RGB->BGR color conversion earlyAndreas Rheinhardt2021-12-08
| | | | | | | Reduces the amount of conversions. Reviewed-by: Philip Langdale <philipl@overt.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/movtextdec: Deduplicate parsing of StyleRecordsAndreas Rheinhardt2021-12-08
| | | | | | | | | Both TextSampleEntry and TextSample can contain StyleRecords; yet both the code as well as the structures for them were duplicated. This commit changes this. Reviewed-by: Philip Langdale <philipl@overt.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/movtextdec: Rename several structure elementsAndreas Rheinhardt2021-12-08
| | | | | | | | | Giving elements of a structure called StyleBox names like "style_start" or "style_end" is redundant, especially given that the relevant variables are also called style. Reviewed-by: Philip Langdale <philipl@overt.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/mov: Simplify data->hex conversionAndreas Rheinhardt2021-12-08
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/md5proto: Simplify data->hex conversionAndreas Rheinhardt2021-12-08
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avutil/aes_ctr: Avoid allocation of AVAES structAndreas Rheinhardt2021-12-08
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/aadec: Use smaller scope for variablesAndreas Rheinhardt2021-12-08
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/aadec: Simplify data->hex conversionAndreas Rheinhardt2021-12-08
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/aadec: Simplify deriving file keyAndreas Rheinhardt2021-12-08
| | | | | | | | Don't use different src and dst in av_tea_crypt(); use in-place modifications instead. Also let av_tea_crypt() encrypt all three blocks in one call. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/aadec: Don't unnecessarily reinitialize AVTEA contextAndreas Rheinhardt2021-12-08
| | | | | | | | We use ECB, not CBC mode here, so one does not need to reinitialize the context; for the same reason, one can also just let av_tea_crypt() loop over the blocks, avoiding a loop here. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/aadec: Avoid copying data aroundAndreas Rheinhardt2021-12-08
| | | | | | | | | | | | | Up until now, the packets have been read in blocks of at most eight bytes at a time; then these blocks have been decrypted and copied into a buffer on the stack (that was double the size needed...). From there they have been copied to the dst packet. This commit changes this: The data is read in one go; and the decryption avoids temporary buffers, too, by making use of the fact that src and dst of av_tea_crypt() can coincide. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/aadec: Don't use the same loop counter in inner and outer loopAndreas Rheinhardt2021-12-08
| | | | | | | Due to this bush.aa (from the FATE suite) exported garbage metadata with key "_040930". Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/utils: Make ff_data_to_hex() zero-terminate the stringAndreas Rheinhardt2021-12-08
| | | | | | Most callers want it that way anyway. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/libkvazaar: Increase array sizeAndreas Rheinhardt2021-12-08
| | | | | | | | | | | | av_image_copy() expects an array of four pointers according to its declaration; although it currently only touches pointers that are actually in use (depending upon the pixel format) this might change at any time (as has already happened for the linesizes in d7bc52bf456deba0f32d9fe5c288ec441f1ebef5). This fixes a -Wstringop-overflow= warning with GCC 11.2. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/rtsp: fix the error code from ffurl_read_complete()Limin Wang2021-12-07
| | | | | Reviewed-by: Martin Storsjö <martin@martin.st> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/rtsp: add error code handling for ff_rtsp_skip_packet()Limin Wang2021-12-07
| | | | | Reviewed-by: Martin Storsjö <martin@martin.st> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/rtsp: free the alloc memory if failedLimin Wang2021-12-07
| | | | | Reviewed-by: Martin Storsjö <martin@martin.st> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/rtsp: remove redundant assignmentLimin Wang2021-12-07
| | | | | Reviewed-by: Martin Storsjö <martin@martin.st> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/concatf: ignore trailing whitespacesGyan Doshi2021-12-07
| | | | | | | | The concatf protocol returns an opaque error on open if concatf list file contains trailing newlines. Signed-off-by: Gyan Doshi <ffmpeg@gyani.pro> Reviewed-by: James Almer <jamrial@gmail.com>
* ffmpeg: handle errors in print_sdp()Anton Khirnov2021-12-07
| | | | Do not continue as if nothing happened.
* ffmpeg: move setting video sync method to new_video_stream()Anton Khirnov2021-12-07
| | | | | | do_video_out() is the wrong place for it, since the necessary information is already known when creating the stream and its value should never change.
* ffmpeg: deprecate passing numbers to -vsyncAnton Khirnov2021-12-07
| | | | | There is never a reason to do this, using symbolic names is always preferred.
* FATE: stop using numeric arguments to -vsyncAnton Khirnov2021-12-07
| | | | Symbolic names are always preferable.
* ffmpeg: change vsync value to an enumAnton Khirnov2021-12-07
| | | | | Stop explicitly defining VSCFR and DROP values, which were never documented.
* ffmpeg: drop useless framerate assignmentsAnton Khirnov2021-12-07
| | | | | | If the input stream framerate is known, it will be configured on the relevant filtergraph input and get propagated to the output stream in the above line. That makes these assignments redundant.
* lavf/protocols: avoid discarding const in avio_enum_protocols()Anton Khirnov2021-12-07
| | | | | | Instead of storing the protocol pointer in the opaque iteration state, store just the index of the next protocol, similarly to how ff_urlcontext_child_class_iterate() works.
* lavf/img2enc: avoid a useless copy of the urlAnton Khirnov2021-12-07
| | | | | img2enc keeps a private (and possibly truncated) copy of the url that is never modified. Just use AVFormatContext.url instead.
* lavf/ftp: check for truncation in snprintfAnton Khirnov2021-12-07
| | | | | | | | | | | Silences e.g. the following warning in gcc 10: src/libavformat/ftp.c: In function ‘ftp_move’: src/libavformat/ftp.c:1122:46: warning: ‘%s’ directive output may be truncated writing up to 4095 bytes into a region of size 4091 [-Wformat-truncation=] 1122 | snprintf(command, sizeof(command), "RNTO %s\r\n", path); | ^~ ~~~~ src/libavformat/ftp.c:1122:5: note: ‘snprintf’ output between 8 and 4103 bytes into a destination of size 4096 1122 | snprintf(command, sizeof(command), "RNTO %s\r\n", path); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* lavfi/vf_subtitles: stop using deprecated ass_set_aspect_ratio()Anton Khirnov2021-12-07
| | | | | It has been deprecated in favor of ass_set_pixel_aspect() since version 0.11.0, roughly ~2014. Even Debian oldoldstable (stretch) has 0.13.
* lavd/v4l2: detect device name truncationAnton Khirnov2021-12-07
| | | | | | | | | | | | | | | | Silences the following warning with gcc 10: src/libavdevice/v4l2.c: In function ‘v4l2_get_device_list’: src/libavdevice/v4l2.c:1042:64: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 251 [-Wformat-truncation=] 1042 | ret = snprintf(device_name, sizeof(device_name), "/dev/%s", entry->d_name); | ^~ src/libavdevice/v4l2.c:1042:15: note: ‘snprintf’ output between 6 and 261 bytes into a destination of size 256 1042 | ret = snprintf(device_name, sizeof(device_name), "/dev/%s", entry->d_name); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Previous patches intending to silence it have proposed increasing the buffer size, but doing that correctly seems to be tricky. Failing on truncation is simpler and just as effective (as excessively long device names are unlikely).
* lavd/v4l2: reduce variable scopeAnton Khirnov2021-12-07
| | | | | | device and cap are local to the loop iteration, there is no need for them to retain their values. Especially for device it may be dangerous, since it points to av_malloc'ed data.
* lavd/v4l2: do not clobber the context FD in v4l2_get_device_list()Anton Khirnov2021-12-07
| | | | | | The FD opened here is local to the loop iteration, there is no reason to store it in the context. Since read_header() may have already been called, this may ovewrite an existing valid FD.
* lavd/jack: increase buffer size for snprintf()Anton Khirnov2021-12-07
| | | | | | | | | | | | | | Maximum output size with a 32-bit int is 17 bytes, or 26 with a 64-bit int. Silences the following gcc 10 warning: src/libavdevice/jack.c: In function ‘audio_read_header’: src/libavdevice/jack.c:171:45: warning: ‘snprintf’ output may be truncated before the last format character [-Wformat-truncation=] 171 | snprintf(str, sizeof(str), "input_%d", i + 1); | ^ src/libavdevice/jack.c:171:9: note: ‘snprintf’ output between 8 and 17 bytes into a destination of size 16 171 | snprintf(str, sizeof(str), "input_%d", i + 1); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* fftools/ffmpeg_opt: Improve alloc/truncation checks when reading linesAndreas Rheinhardt2021-12-07
| | | | | | | | Do this by switching from the dynamic buffer API to the AVBPrint API; the former has no defined way to check for errors. This also avoids allocating an AVIOContext. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fftools/ffmpeg_opt: Improve checks for truncation/alloc errorAndreas Rheinhardt2021-12-07
| | | | | | | | Do this by switching from the dynamic buffer API to the AVBPrint API; the former has no defined way to check for errors. This also avoids allocating an AVIOContext. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* packet: add description for the AVPacket.time_base fieldLynne2021-12-06
| | | | | This description documents the field. Thanks to elenril for suggesting the phrasing.
* avformat/mov: Disallow duplicate smdmMichael Niedermayer2021-12-06
| | | | | | | | Fixes: memleak Fixes: 39879/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-5327819907923968 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/gemdec: Move all support checks before image allocationMichael Niedermayer2021-12-06
| | | | | Reviewed-by: Peter Ross <pross@xvid.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* tools/target_dec_fuzzer: Adjust threshold for HQ_HQAMichael Niedermayer2021-12-06
| | | | | | | | Fixes: Timeout Fixes: 41120/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HQ_HQA_fuzzer-6327761690558464 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* tools/target_dec_fuzzer: adjust threshold for gemMichael Niedermayer2021-12-06
| | | | | | | | Fixes: Timeout Fixes: 42035/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_GEM_fuzzer-5033604191748096 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/avpacket: Perform fewer reallocations in repeated av_grow_packet()Michael Niedermayer2021-12-06
| | | | | | | | Fixes: Timeout Fixes: 41446/clusterfuzz-testcase-minimized-ffmpeg_dem_SAMI_fuzzer-4667644540747776 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mov: Check for EOF in mov_read_glbl()Michael Niedermayer2021-12-06
| | | | | | | | Fixes: Infinite loop Fixes: 41351/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-5433895854669824 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/libopenh264dec: Increase array sizes, fix stack-buffer overreadAndreas Rheinhardt2021-12-06
| | | | | | | | | | | | | | | av_image_copy() expects an array of four pointers and linesizes according to its declaration; it currently only pointers that are actually in use (depending upon the pixel format), but this might change at any time. It has already happened for the linesizes in d7bc52bf456deba0f32d9fe5c288ec441f1ebef5 and so increasing their array fixes a stack-buffer overread. This fixes a -Wstringop-overflow= and -Wstringop-overread warning from GCC 11.2. Reviewed-by: Linjie Fu <linjie.justin.fu@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* doc/filters: note duration range in xfadeGyan Doshi2021-12-06
|
* avformat/smoothstreamingenc: Move buffers to the end of structsAndreas Rheinhardt2021-12-05
| | | | | | | | This reduces codesize because the offsets of commonly used elements are now smaller and thus need less bytes to encode in ptr+offset addressing modes (with GCC 11.2 on x64: 0x1b8b -> 0x1a7b). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>