Commit d4f0f2d1 authored by Anton Khirnov's avatar Anton Khirnov

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.
parent e5419709
...@@ -1416,7 +1416,7 @@ int attribute_align_arg avcodec_decode_video2(AVCodecContext *avctx, AVFrame *pi ...@@ -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; 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); av_frame_unref(picture);
if (*got_picture_ptr) { if (*got_picture_ptr) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment