summaryrefslogtreecommitdiff
path: root/libavcodec/cavsdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-06-17 02:30:28 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-06-17 02:30:28 +0200
commit61df0819d49ba831948681a7e8aa1a6def26b1a9 (patch)
tree759aed264cab441e5eb59afd4646db8fd40524e4 /libavcodec/cavsdec.c
parent2fbdfba0f2d1851f894002d9d5930799629cc194 (diff)
avcodec/cavsdec: fix low delay decoding
Fixes Ticket1095 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/cavsdec.c')
-rw-r--r--libavcodec/cavsdec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/cavsdec.c b/libavcodec/cavsdec.c
index 399b5b914f..51f6e25d34 100644
--- a/libavcodec/cavsdec.c
+++ b/libavcodec/cavsdec.c
@@ -1199,8 +1199,8 @@ static int cavs_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
break;
*got_frame = 1;
if (h->cur.f->pict_type != AV_PICTURE_TYPE_B) {
- if (h->DPB[1].f->data[0]) {
- if ((ret = av_frame_ref(data, h->DPB[1].f)) < 0)
+ if (h->DPB[!h->low_delay].f->data[0]) {
+ if ((ret = av_frame_ref(data, h->DPB[!h->low_delay].f)) < 0)
return ret;
} else {
*got_frame = 0;