mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-06-16 04:32:47 +02:00
avs: fix infinite loop on end-of-stream.
The codec would keep returning the last decoded frame if the stream
contains B-frames, since it wouldn't clear that frame from the list of
frames to be returned to the user.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit 83f15a1228)
Conflicts:
libavcodec/cavsdec.c
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
This commit is contained in:
committed by
Reinhard Tartler
parent
2744fdbd9e
commit
d4f2786cda
@@ -655,7 +655,8 @@ static int cavs_decode_frame(AVCodecContext * avctx,void *data, int *data_size,
|
||||
if (buf_size == 0) {
|
||||
if (!s->low_delay && h->DPB[0].f.data[0]) {
|
||||
*data_size = sizeof(AVPicture);
|
||||
*picture = *(AVFrame *) &h->DPB[0];
|
||||
*picture = h->DPB[0].f;
|
||||
memset(&h->DPB[0], 0, sizeof(h->DPB[0]));
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user