]> git.sesse.net Git - ffmpeg/commitdiff
lavc/decode: Fix the error number report if av_image_fill_pointers fail.
authorJun Zhao <mypopydev@gmail.com>
Sun, 28 Oct 2018 02:27:22 +0000 (10:27 +0800)
committerJun Zhao <jun.zhao@intel.com>
Tue, 30 Oct 2018 05:16:47 +0000 (13:16 +0800)
-1 will be map to error number "EPERM", and will be map to the error
message like "Error while decoding stream #0:0: Operation not permitted",
it's a strange error message when debug update_frame_pool fail,
now only return the error code from av_image_fill_pointers in case
of av_image_fill_pointers failure.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
libavcodec/decode.c

index 2e82f6b506787978e012173baab3f2d3afe71800..c89c77c43a98d6a5a12714cab591e9561ae52a57 100644 (file)
@@ -1496,7 +1496,7 @@ static int update_frame_pool(AVCodecContext *avctx, AVFrame *frame)
         tmpsize = av_image_fill_pointers(data, avctx->pix_fmt, h,
                                          NULL, linesize);
         if (tmpsize < 0)
-            return -1;
+            return tmpsize;
 
         for (i = 0; i < 3 && data[i + 1]; i++)
             size[i] = data[i + 1] - data[i];