]> git.sesse.net Git - ffmpeg/commitdiff
lavc: use buf[0] instead of data[0] as the indicator of an allocated frame
authorAnton Khirnov <anton@khirnov.net>
Fri, 29 Nov 2013 19:16:07 +0000 (20:16 +0100)
committerAnton Khirnov <anton@khirnov.net>
Mon, 9 Dec 2013 07:44:11 +0000 (08:44 +0100)
data[0] may be NULL for valid frames with hwaccel pixel formats.

libavcodec/utils.c

index 37f4979f6a6e9735878eb931a035ca4ea85a2d02..d1a1510858b2842e40fe024922e7cf0f4cd76925 100644 (file)
@@ -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) {