[FFmpeg-cvslog] lavc/decode: Fix the error number report if av_image_fill_pointers fail.

Jun Zhao git at videolan.org
Tue Oct 30 07:18:23 EET 2018


ffmpeg | branch: master | Jun Zhao <mypopydev at gmail.com> | Sun Oct 28 10:27:22 2018 +0800| [903f2beafc7c5379ff65a7ca9b9e7b7ee49c75bf] | committer: Jun Zhao

lavc/decode: Fix the error number report if av_image_fill_pointers fail.

-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 at gmail.com>

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

 libavcodec/decode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/decode.c b/libavcodec/decode.c
index 2e82f6b506..c89c77c43a 100644
--- a/libavcodec/decode.c
+++ b/libavcodec/decode.c
@@ -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];



More information about the ffmpeg-cvslog mailing list