[FFmpeg-cvslog] avdevice/lavfi: Use av_packet_move_ref() for packet ownership transfer
Andreas Rheinhardt
git at videolan.org
Tue Sep 1 10:50:13 EEST 2020
ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at gmail.com> | Sun Aug 30 05:45:47 2020 +0200| [e4a650b61ab8b52230ff7fd63823d1a34706d51a] | committer: Andreas Rheinhardt
avdevice/lavfi: Use av_packet_move_ref() for packet ownership transfer
Reviewed-by: Paul B Mahol <onemda at gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e4a650b61ab8b52230ff7fd63823d1a34706d51a
---
libavdevice/lavfi.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/libavdevice/lavfi.c b/libavdevice/lavfi.c
index c949ff7e12..2a95cb013c 100644
--- a/libavdevice/lavfi.c
+++ b/libavdevice/lavfi.c
@@ -392,10 +392,7 @@ static int lavfi_read_packet(AVFormatContext *avctx, AVPacket *pkt)
int size = 0;
if (lavfi->subcc_packet.size) {
- *pkt = lavfi->subcc_packet;
- av_init_packet(&lavfi->subcc_packet);
- lavfi->subcc_packet.size = 0;
- lavfi->subcc_packet.data = NULL;
+ av_packet_move_ref(pkt, &lavfi->subcc_packet);
return pkt->size;
}
More information about the ffmpeg-cvslog
mailing list