Andreas Rheinhardt
7f985c2174
avcodec/libxvid: Fix leak of AVPacket on error
...
Regression since 2101b99777
.
Fixes Coverity issue #1473721 .
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-03-19 02:25:09 +01:00
Andreas Rheinhardt
edcbb3e1b9
avformat/tests/fifo_muxer: Fix memleak on error, fix API violation
...
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>
2021-03-19 02:25:02 +01:00
Andreas Rheinhardt
aff1d373b1
avformat/tests/fifo_muxer: Fix leak of AVPacket on error
...
Also factor allocating and freeing the packet out.
Fixes Coverity issues #1473722 and #1473723 ; it is a regression
since 4b386b2059
.
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-03-19 02:24:53 +01:00
Andreas Rheinhardt
ea1e15fdc4
avformat/mxfdec: Fix leak on error
...
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>
2021-03-19 00:42:27 +01:00
Andreas Rheinhardt
9224b1f6b3
avformat/mxfdec: Don't use wrong type of pointer
...
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>
2021-03-19 00:41:16 +01:00
Andreas Rheinhardt
5edcdfc318
avcodec/pngdec: Fix memleak by postponing allocation
...
Fixes Coverity ticket #1322342 .
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-03-19 00:10:24 +01:00
Guo, Yejun
da12d600ea
lavfi/dnn_backend_openvino.c: fix mem leak for TaskItem upon error
2021-03-18 09:30:09 +08:00
Guo, Yejun
df59ae8bb2
lavfi/dnn_backend_openvino.c: fix mem leak for RequestItem upon error
2021-03-18 09:30:09 +08:00
Guo, Yejun
41f4af16fc
lavfi/dnn_backend_openvino.c: fix typo upon error
2021-03-18 09:30:09 +08:00
Guo, Yejun
bd3ca0859e
lavfi/dnn_backend_openvino.c: fix mem leak for input_blob and output_blob upon error
2021-03-18 09:30:09 +08:00
Guo, Yejun
3ce2ee7f54
lavfi/dnn_backend_openvino.c: fix mem leak for AVFrame upon error
2021-03-18 09:30:09 +08:00
James Almer
82bd02a2c7
fftools/ffmpeg: use av_packet_alloc() to allocate packets
...
Signed-off-by: James Almer <jamrial@gmail.com>
2021-03-17 15:19:38 -03:00
James Almer
4aa586944e
fftools/ffprobe: use av_packet_alloc() to allocate packets
...
Signed-off-by: James Almer <jamrial@gmail.com>
2021-03-17 15:19:38 -03:00
James Almer
d492b17024
doc/examples/vaapi_transcode: use av_packet_alloc() to allocate packets
...
Signed-off-by: James Almer <jamrial@gmail.com>
2021-03-17 15:19:37 -03:00
James Almer
6394c7d51a
doc/examples/vaapi_encode: use av_packet_alloc() to allocate packets
...
Signed-off-by: James Almer <jamrial@gmail.com>
2021-03-17 15:19:37 -03:00
James Almer
b896832b78
doc/examples/transcoding: use av_packet_alloc() to allocate packets
...
Signed-off-by: James Almer <jamrial@gmail.com>
2021-03-17 15:19:37 -03:00
James Almer
16dba17329
doc/examples/transcode_aac: use av_packet_alloc() to allocate packets
...
Signed-off-by: James Almer <jamrial@gmail.com>
2021-03-17 15:19:37 -03:00
James Almer
07b788c8af
doc/examples/demuxing_decoding: use av_packet_alloc() to allocate packets
...
Signed-off-by: James Almer <jamrial@gmail.com>
2021-03-17 15:19:37 -03:00
James Almer
7643a35474
tests/api/api-flac-test: use av_packet_alloc() to allocate packets
...
Signed-off-by: James Almer <jamrial@gmail.com>
2021-03-17 15:19:37 -03:00
James Almer
36d4e4c9b5
tools/target_bsf_fuzzer: use av_packet_alloc() to allocate packets
...
Signed-off-by: James Almer <jamrial@gmail.com>
2021-03-17 15:19:37 -03:00
James Almer
64f092eb5e
tools/target_dem_fuzzer: use av_packet_alloc() to allocate packets
...
Signed-off-by: James Almer <jamrial@gmail.com>
2021-03-17 15:19:37 -03:00
James Almer
08dbcaa57a
tools/target_dec_fuzzer: use av_packet_alloc() to allocate packets
...
Signed-off-by: James Almer <jamrial@gmail.com>
2021-03-17 15:19:37 -03:00
James Almer
32582a4e2a
tools/pktdumper: use av_packet_alloc() to allocate packets
...
Signed-off-by: James Almer <jamrial@gmail.com>
2021-03-17 15:19:36 -03:00
James Almer
b76ff693f6
avfilter/vf_uspp: use av_packet_alloc() to allocate packets
...
Signed-off-by: James Almer <jamrial@gmail.com>
2021-03-17 15:19:36 -03:00
James Almer
79c6e040f8
avfilter/vf_mcdeint: use av_packet_alloc() to allocate packets
...
Signed-off-by: James Almer <jamrial@gmail.com>
2021-03-17 15:19:36 -03:00
James Almer
54cb30ce64
avdevice/xcbgrab: stop using av_init_packet()
...
Signed-off-by: James Almer <jamrial@gmail.com>
2021-03-17 15:19:36 -03:00
James Almer
6b3a563b10
avdevice/decklink_dec: stop using av_init_packet()
...
Signed-off-by: James Almer <jamrial@gmail.com>
2021-03-17 15:19:36 -03:00
James Almer
d365f74dce
avformat/tests/movenc: use av_packet_alloc() to allocate packets
...
Signed-off-by: James Almer <jamrial@gmail.com>
2021-03-17 15:19:36 -03:00
James Almer
4b386b2059
avformat/tests/fifo_muxer: use av_packet_alloc() to allocate packets
...
Signed-off-by: James Almer <jamrial@gmail.com>
2021-03-17 15:19:36 -03:00
James Almer
2fdfad5525
avformat/wc3movie: use av_packet_alloc() to allocate packets
...
Signed-off-by: James Almer <jamrial@gmail.com>
2021-03-17 15:19:36 -03:00
James Almer
98a776b5e3
avformat/subtitles: use av_packet_alloc() to allocate packets
...
Signed-off-by: James Almer <jamrial@gmail.com>
2021-03-17 15:19:36 -03:00
James Almer
fd23efb20b
avformat/rtpenc_mpegts: use av_packet_alloc() to allocate packets
...
Signed-off-by: James Almer <jamrial@gmail.com>
2021-03-17 15:19:36 -03:00
James Almer
5e518c7416
avformat/rtpdec: use av_packet_alloc() to allocate packets
...
Signed-off-by: James Almer <jamrial@gmail.com>
2021-03-17 15:19:16 -03:00
James Almer
e7f1540507
avformat/mpegtsenc: use av_packet_alloc() to allocate packets
...
Signed-off-by: James Almer <jamrial@gmail.com>
2021-03-17 15:06:49 -03:00
James Almer
42422b6dca
avformat/mpegts: use av_packet_alloc() to allocate packets
...
Signed-off-by: James Almer <jamrial@gmail.com>
2021-03-17 15:06:49 -03:00
James Almer
ecdad29b67
avformat/movenc: use av_packet_alloc() to allocate packets
...
Signed-off-by: James Almer <jamrial@gmail.com>
2021-03-17 15:06:49 -03:00
James Almer
2e80435a9a
avformat/matroskaenc: use av_packet_alloc() to allocate packets
...
Signed-off-by: James Almer <jamrial@gmail.com>
2021-03-17 15:06:49 -03:00
James Almer
8d78e90a6b
avformat/matroskadec: use av_packet_alloc() to allocate packets
...
Signed-off-by: James Almer <jamrial@gmail.com>
2021-03-17 15:06:49 -03:00
James Almer
f57a258223
avformat/hls: use av_packet_alloc() to allocate packets
...
Signed-off-by: James Almer <jamrial@gmail.com>
2021-03-17 15:06:49 -03:00
James Almer
83a320226c
avformat/flacdec: use av_packet_alloc() to allocate packets
...
Signed-off-by: James Almer <jamrial@gmail.com>
2021-03-17 15:06:49 -03:00
James Almer
453021c74e
avformat/id3v2: replace call to av_init_packet()
...
Signed-off-by: James Almer <jamrial@gmail.com>
2021-03-17 15:06:48 -03:00
James Almer
4de3504adf
avformat/flac_picture: replace call to av_init_packet()
...
Signed-off-by: James Almer <jamrial@gmail.com>
2021-03-17 15:06:48 -03:00
James Almer
9e92fd97d0
avformat/avienc: use av_packet_alloc() to allocate packets
...
Signed-off-by: James Almer <jamrial@gmail.com>
2021-03-17 15:06:48 -03:00
James Almer
a7c238cbd8
avformat/avidec: use av_packet_alloc() to allocate packets
...
Signed-off-by: James Almer <jamrial@gmail.com>
2021-03-17 15:06:48 -03:00
James Almer
3c69e5cd6f
avformat/asfdec_o: use av_packet_alloc() to allocate packets
...
Signed-off-by: James Almer <jamrial@gmail.com>
2021-03-17 15:06:48 -03:00
James Almer
82faeb56ce
avformat/amvenc: use av_packet_alloc() to allocate packets
...
Signed-off-by: James Almer <jamrial@gmail.com>
2021-03-17 15:06:48 -03:00
James Almer
01f4d33b41
avformat/utils: use av_packet_alloc() to allocate packets
...
Signed-off-by: James Almer <jamrial@gmail.com>
2021-03-17 15:06:48 -03:00
James Almer
9066969713
avformat/mux: use av_packet_alloc() to allocate packets
...
Signed-off-by: James Almer <jamrial@gmail.com>
2021-03-17 15:06:48 -03:00
James Almer
2995a1f294
avcodec/tests/avpacket: use av_packet_alloc() to allocate packets
...
Signed-off-by: James Almer <jamrial@gmail.com>
2021-03-17 15:06:48 -03:00
James Almer
4ab7670762
avcodec/webp: use av_packet_alloc() to allocate packets
...
Signed-off-by: James Almer <jamrial@gmail.com>
2021-03-17 15:06:48 -03:00