summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* avutil/adler32: Switch av_adler32_update() to size_t on bumpAndreas Rheinhardt2021-03-19
| | | | | | | | | | av_adler32_update() is used by av_hash_update() which will be switched to size_t at the next bump. So it also has to be made to use size_t. This is also necessary for framecrcenc.c, because the size of side data will become a size_t, too. Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/packet: Also change av_packet_pack/unpack_dictionary to size_tAndreas Rheinhardt2021-03-19
| | | | | | | | | These are auxiliary side-data functions, so they should have been switched to size_t in d79e0fe65c51491f9bf8a470bbe36fb09f3e1280, but this has been forgotten. Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/avpacket: Improve overflow checks when packing dictionaryAndreas Rheinhardt2021-03-19
| | | | | | Also avoid reallocations. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat: Make AVChapter.id an int64_t on next major bumpAndreas Rheinhardt2021-03-19
| | | | | | | | | 64 bits are needed in order to retain the uid values of Matroska chapters; the type is kept signed because the semantics of NUT chapters depend upon whether the id is > 0 or < 0. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/matroskaenc: Check chapter ids for duplicatesAndreas Rheinhardt2021-03-19
| | | | | | | | | | | | | | | Up until now, there has been no check that each chapter has a unique id; there was only a check for whether a chapter id is zero (this happens often when the chapters originated from a format that lacks the concept of chapter id and simply counts from zero) which is invalid in Matroska. In this case the chapter ids are offset by 1 to make them nonnegative. Yet offsetting won't fix duplicate ids, therefore this is changed to simply create new chapter uids when the input chapter uids don't conform to the requirements of Matroska (in which case it can be presumed that they did not originate from Matroska, so that we don't need to bother to preserve them). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/libxvid: Remove set-but-unused variableAndreas Rheinhardt2021-03-19
| | | | | | | Set-but-unused since 2101b99777860c853ca2321031eb3f4047dc5894. Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/libxvid: Fix leak of AVPacket on errorAndreas Rheinhardt2021-03-19
| | | | | | | | Regression since 2101b99777860c853ca2321031eb3f4047dc5894. Fixes Coverity issue #1473721. Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/tests/fifo_muxer: Fix memleak on error, fix API violationAndreas Rheinhardt2021-03-19
| | | | | | | | | | The test program for the FIFO muxer allocates a buffer without padding and wraps it into a packet via av_packet_from_data(). This is an API violation. Furthermore, said buffer leaks in case av_packet_from_data() fails. Fix both of these issues by using av_new_packet() instead. Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/tests/fifo_muxer: Fix leak of AVPacket on errorAndreas Rheinhardt2021-03-19
| | | | | | | | | Also factor allocating and freeing the packet out. Fixes Coverity issues #1473722 and #1473723; it is a regression since 4b386b2059806ca7ee7f991d2c8b735410693e8c. Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/mxfdec: Fix leak on errorAndreas Rheinhardt2021-03-19
| | | | | | | | It was introduced in d3d9b1fc8e2dfc8b4d66c9916ab7221062ff4660; Fixes Coverity issue #733800. Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/mxfdec: Don't use wrong type of pointerAndreas Rheinhardt2021-03-19
| | | | | | | | | | | If one of the two results of a ternary conditional is a pointer to void, the type of the whole conditional operator is a pointer to void, even when the other possible result is not a pointer to void. This loophole in the type system has allowed mxf_read_local_tags to have a pointer of type pointer to MXFMetadataSet that actually points to an MXFContext. Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/pngdec: Fix memleak by postponing allocationAndreas Rheinhardt2021-03-19
| | | | | | Fixes Coverity ticket #1322342. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* lavfi/dnn_backend_openvino.c: fix mem leak for TaskItem upon errorGuo, Yejun2021-03-18
|
* lavfi/dnn_backend_openvino.c: fix mem leak for RequestItem upon errorGuo, Yejun2021-03-18
|
* lavfi/dnn_backend_openvino.c: fix typo upon errorGuo, Yejun2021-03-18
|
* lavfi/dnn_backend_openvino.c: fix mem leak for input_blob and output_blob ↵Guo, Yejun2021-03-18
| | | | upon error
* lavfi/dnn_backend_openvino.c: fix mem leak for AVFrame upon errorGuo, Yejun2021-03-18
|
* fftools/ffmpeg: use av_packet_alloc() to allocate packetsJames Almer2021-03-17
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* fftools/ffprobe: use av_packet_alloc() to allocate packetsJames Almer2021-03-17
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* doc/examples/vaapi_transcode: use av_packet_alloc() to allocate packetsJames Almer2021-03-17
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* doc/examples/vaapi_encode: use av_packet_alloc() to allocate packetsJames Almer2021-03-17
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* doc/examples/transcoding: use av_packet_alloc() to allocate packetsJames Almer2021-03-17
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* doc/examples/transcode_aac: use av_packet_alloc() to allocate packetsJames Almer2021-03-17
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* doc/examples/demuxing_decoding: use av_packet_alloc() to allocate packetsJames Almer2021-03-17
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* tests/api/api-flac-test: use av_packet_alloc() to allocate packetsJames Almer2021-03-17
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* tools/target_bsf_fuzzer: use av_packet_alloc() to allocate packetsJames Almer2021-03-17
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* tools/target_dem_fuzzer: use av_packet_alloc() to allocate packetsJames Almer2021-03-17
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* tools/target_dec_fuzzer: use av_packet_alloc() to allocate packetsJames Almer2021-03-17
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* tools/pktdumper: use av_packet_alloc() to allocate packetsJames Almer2021-03-17
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avfilter/vf_uspp: use av_packet_alloc() to allocate packetsJames Almer2021-03-17
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avfilter/vf_mcdeint: use av_packet_alloc() to allocate packetsJames Almer2021-03-17
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avdevice/xcbgrab: stop using av_init_packet()James Almer2021-03-17
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avdevice/decklink_dec: stop using av_init_packet()James Almer2021-03-17
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/tests/movenc: use av_packet_alloc() to allocate packetsJames Almer2021-03-17
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/tests/fifo_muxer: use av_packet_alloc() to allocate packetsJames Almer2021-03-17
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/wc3movie: use av_packet_alloc() to allocate packetsJames Almer2021-03-17
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/subtitles: use av_packet_alloc() to allocate packetsJames Almer2021-03-17
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/rtpenc_mpegts: use av_packet_alloc() to allocate packetsJames Almer2021-03-17
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/rtpdec: use av_packet_alloc() to allocate packetsJames Almer2021-03-17
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/mpegtsenc: use av_packet_alloc() to allocate packetsJames Almer2021-03-17
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/mpegts: use av_packet_alloc() to allocate packetsJames Almer2021-03-17
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/movenc: use av_packet_alloc() to allocate packetsJames Almer2021-03-17
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/matroskaenc: use av_packet_alloc() to allocate packetsJames Almer2021-03-17
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/matroskadec: use av_packet_alloc() to allocate packetsJames Almer2021-03-17
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/hls: use av_packet_alloc() to allocate packetsJames Almer2021-03-17
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/flacdec: use av_packet_alloc() to allocate packetsJames Almer2021-03-17
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/id3v2: replace call to av_init_packet()James Almer2021-03-17
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/flac_picture: replace call to av_init_packet()James Almer2021-03-17
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/avienc: use av_packet_alloc() to allocate packetsJames Almer2021-03-17
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/avidec: use av_packet_alloc() to allocate packetsJames Almer2021-03-17
| | | | Signed-off-by: James Almer <jamrial@gmail.com>