From: "Ronald S. Bultje" <[email protected]>
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.
---
libavcodec/cavsdec.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/libavcodec/cavsdec.c b/libavcodec/cavsdec.c
index 2f4b6e3..94c1e4b 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 = *(AVFrame *) &h->DPB[0];
+ memset(&h->DPB[0], 0, sizeof(h->DPB[0]));
}
return 0;
}
--
1.7.7.4
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel