[FFmpeg-cvslog] avs: fix infinite loop on end-of-stream.
Ronald S. Bultje
git at videolan.org
Fri Mar 9 01:49:25 CET 2012
ffmpeg | branch: master | Ronald S. Bultje <rsbultje at gmail.com> | Wed Feb 15 16:21:34 2012 -0800| [83f15a1228895434a982c840b09edccd1c64e800] | committer: Ronald S. Bultje
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 at libav.org
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=83f15a1228895434a982c840b09edccd1c64e800
---
libavcodec/cavsdec.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/libavcodec/cavsdec.c b/libavcodec/cavsdec.c
index 1da4eb1..e320134 100644
--- a/libavcodec/cavsdec.c
+++ b/libavcodec/cavsdec.c
@@ -656,6 +656,7 @@ static int cavs_decode_frame(AVCodecContext * avctx,void *data, int *data_size,
if (!s->low_delay && h->DPB[0].f.data[0]) {
*data_size = sizeof(AVPicture);
*picture = h->DPB[0].f;
+ memset(&h->DPB[0], 0, sizeof(h->DPB[0]));
}
return 0;
}
More information about the ffmpeg-cvslog
mailing list