forked from FFmpeg/FFmpeg
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>
This commit is contained in:
parent
6fad76b51d
commit
e4a650b61a
1 changed files with 1 additions and 4 deletions
|
@ -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…
Add table
Reference in a new issue