avdevice/lavfi: Use av_packet_move_ref() for packet ownership transfer

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
pull/350/head
Andreas Rheinhardt 4 years ago
parent 6fad76b51d
commit e4a650b61a
  1. 5
      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;
}

Loading…
Cancel
Save