Browse Source

avdevice/lavfi: Don't set pkt->size to the value it already has

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>
tags/n4.4
Andreas Rheinhardt 5 years ago
parent
commit
901251d59b
1 changed files with 0 additions and 1 deletions
  1. +0
    -1
      libavdevice/lavfi.c

+ 0
- 1
libavdevice/lavfi.c View 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;
}


Loading…
Cancel
Save