From: Anton Khirnov Date: Fri, 29 Nov 2013 19:16:07 +0000 (+0100) Subject: lavc: use buf[0] instead of data[0] as the indicator of an allocated frame X-Git-Tag: android-x86-6.0-r1~10^2~2562 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=d4f0f2d1e80b76260eb6b9cdde472ac069dfda56;p=android-x86%2Fexternal-ffmpeg.git lavc: use buf[0] instead of data[0] as the indicator of an allocated frame data[0] may be NULL for valid frames with hwaccel pixel formats. --- diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 37f4979f6a..d1a1510858 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -1416,7 +1416,7 @@ int attribute_align_arg avcodec_decode_video2(AVCodecContext *avctx, AVFrame *pi emms_c(); //needed to avoid an emms_c() call before every return; - if (ret < 0 && picture->data[0]) + if (ret < 0 && picture->buf[0]) av_frame_unref(picture); if (*got_picture_ptr) {