]> git.sesse.net Git - ffmpeg/commitdiff
avdevice/lavfi: Don't set pkt->size to the value it already has
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Sun, 30 Aug 2020 05:32:48 +0000 (07:32 +0200)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Tue, 1 Sep 2020 07:50:05 +0000 (09:50 +0200)
av_new_packet() already sets the size. And if the packet is not
allocated by av_new_packet() (which seems to be impossible atm), both
pkt->size as well as size are 0, so setting it again is unnecessary in
this scenario, too.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavdevice/lavfi.c

index 5e814eada85f7298077ab9a0d57748f4a905791a..72ec1bb9b7cc22f8d1023037535eeada590e495d 100644 (file)
@@ -474,7 +474,6 @@ static int lavfi_read_packet(AVFormatContext *avctx, AVPacket *pkt)
     pkt->stream_index = stream_idx;
     pkt->pts = frame->pts;
     pkt->pos = frame->pkt_pos;
-    pkt->size = size;
     av_frame_unref(frame);
     return size;
 }