[FFmpeg-cvslog] dxa: fix support of decoding all frames even in the absence of references

Michael Niedermayer git at videolan.org
Sat Aug 17 11:51:09 CEST 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Aug 17 11:12:47 2013 +0200| [9640ea1da4e0893001031c6d88aa48f350cc9956] | committer: Michael Niedermayer

dxa: fix support of decoding all frames even in the absence of references

The case where decoding should only happen for keyframes and afterwards
(CODEC_FLAG2_SHOW_ALL not set) does not fully work neither before nor
after this

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9640ea1da4e0893001031c6d88aa48f350cc9956
---

 libavcodec/dxa.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavcodec/dxa.c b/libavcodec/dxa.c
index 0ef208b..8f8e1a7 100644
--- a/libavcodec/dxa.c
+++ b/libavcodec/dxa.c
@@ -264,7 +264,8 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPac
     case 5:
         if (!tmpptr && (compr & 1)) {
             av_log(avctx, AV_LOG_ERROR, "Missing reference frame.\n");
-            return AVERROR_INVALIDDATA;
+            if (!(avctx->flags2 & CODEC_FLAG2_SHOW_ALL))
+                return AVERROR_INVALIDDATA;
         }
         frame->key_frame = !(compr & 1);
         frame->pict_type = (compr & 1) ? AV_PICTURE_TYPE_P : AV_PICTURE_TYPE_I;



More information about the ffmpeg-cvslog mailing list