diff mbox series

[FFmpeg-devel,4/5] avdevice/lavfi: Remove redundant av_packet_unref()

Message ID 20200830145045.4437-4-andreas.rheinhardt@gmail.com
State Accepted
Commit 5c2c35da12127a87cc33ed8d85305406a0e56801
Headers show
Series [FFmpeg-devel,1/5] avdevice/lavfi: Use av_packet_move_ref() for packet ownership transfer | expand

Checks

Context Check Description
andriy/default pending
andriy/make success Make finished
andriy/make_fate success Make fate finished

Commit Message

Andreas Rheinhardt Aug. 30, 2020, 2:50 p.m. UTC
Since bae8844e35147f92e612a9e0b44e939a293e5bc9, the AVPacket that is
intended to be used to return the demuxed packet is automatically
unreferenced when the demuxer returns an error. This makes an
av_packet_unref() in the lavfi demuxer redundant.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
---
 libavdevice/lavfi.c | 1 -
 1 file changed, 1 deletion(-)
diff mbox series

Patch

diff --git a/libavdevice/lavfi.c b/libavdevice/lavfi.c
index bafc3275c9..2b4e9290dc 100644
--- a/libavdevice/lavfi.c
+++ b/libavdevice/lavfi.c
@@ -458,7 +458,6 @@  static int lavfi_read_packet(AVFormatContext *avctx, AVPacket *pkt)
 
     if ((ret = create_subcc_packet(avctx, frame, min_pts_sink_idx)) < 0) {
         av_frame_unref(frame);
-        av_packet_unref(pkt);
         return ret;
     }