[FFmpeg-cvslog] avdevice/lavfi: Remove redundant av_packet_unref()

Andreas Rheinhardt git at videolan.org
Sun Sep 6 22:55:57 EEST 2020


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at gmail.com> | Sun Aug 30 07:12:47 2020 +0200| [5c2c35da12127a87cc33ed8d85305406a0e56801] | committer: Andreas Rheinhardt

avdevice/lavfi: Remove redundant av_packet_unref()

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 at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5c2c35da12127a87cc33ed8d85305406a0e56801
---

 libavdevice/lavfi.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/libavdevice/lavfi.c b/libavdevice/lavfi.c
index c04e0b147a..4f05a1542e 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;
     }
 



More information about the ffmpeg-cvslog mailing list