mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
fftools/ffplay: fix possible memory leak in decoder
Fixes ticket #8549. Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
parent
cb3c77cfee
commit
af7ec793d4
@ -644,7 +644,10 @@ static int decoder_decode_frame(Decoder *d, AVFrame *frame, AVSubtitle *sub) {
|
||||
if (packet_queue_get(d->queue, &pkt, 1, &d->pkt_serial) < 0)
|
||||
return -1;
|
||||
}
|
||||
} while (d->queue->serial != d->pkt_serial);
|
||||
if (d->queue->serial == d->pkt_serial)
|
||||
break;
|
||||
av_packet_unref(&pkt);
|
||||
} while (1);
|
||||
|
||||
if (pkt.data == flush_pkt.data) {
|
||||
avcodec_flush_buffers(d->avctx);
|
||||
|
Loading…
x
Reference in New Issue
Block a user