[vlc-commits] avcodec: return -ENOMEN when there is no pictures

Thomas Guillem git at videolan.org
Mon Dec 21 15:52:57 CET 2015


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Dec 11 11:59:15 2015 +0100| [19281ac3c52ff2aa38b5fb52593465996b6d95bf] | committer: Thomas Guillem

avcodec: return -ENOMEN when there is no pictures

In case of ENOMEN, the current avcodec worker thread will be stopped.

As advised by lu_zero.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=19281ac3c52ff2aa38b5fb52593465996b6d95bf
---

 modules/codec/avcodec/video.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
index 32d1406..202964e 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -1097,7 +1097,7 @@ static int lavc_GetFrame(struct AVCodecContext *ctx, AVFrame *frame, int flags)
 
     pic = decoder_GetPicture(dec);
     if (pic == NULL)
-        return -1;
+        return -ENOMEM;
 
     if (sys->p_va != NULL)
         return lavc_va_GetFrame(ctx, frame, pic);



More information about the vlc-commits mailing list