[FFmpeg-cvslog] r17452 - trunk/libavcodec/mpegvideo.c

iive subversion
Thu Feb 19 09:39:47 CET 2009


Author: iive
Date: Thu Feb 19 09:39:47 2009
New Revision: 17452

Log:
Exit with error if MPV_common_init() is called with PIX_FMT_NONE.
Give nice error message to fix codecs that call it this way.

Modified:
   trunk/libavcodec/mpegvideo.c

Modified: trunk/libavcodec/mpegvideo.c
==============================================================================
--- trunk/libavcodec/mpegvideo.c	Thu Feb 19 01:54:59 2009	(r17451)
+++ trunk/libavcodec/mpegvideo.c	Thu Feb 19 09:39:47 2009	(r17452)
@@ -402,6 +402,11 @@ int MPV_common_init(MpegEncContext *s)
 
     s->mb_height = (s->height + 15) / 16;
 
+    if(s->avctx->pix_fmt == PIX_FMT_NONE){
+        av_log(s->avctx, AV_LOG_ERROR, "decoding to PIX_FMT_NONE is not supported.\n");
+        return -1;
+    }
+
     if(s->avctx->thread_count > MAX_THREADS || (s->avctx->thread_count > s->mb_height && s->mb_height)){
         av_log(s->avctx, AV_LOG_ERROR, "too many threads\n");
         return -1;




More information about the ffmpeg-cvslog mailing list