[FFmpeg-cvslog] r19164 - trunk/ffmpeg.c

bcoudurier subversion
Fri Jun 12 10:15:37 CEST 2009


Author: bcoudurier
Date: Fri Jun 12 10:15:37 2009
New Revision: 19164

Log:
Fail and print correct error message when video stream pixel format
is unknown.

Modified:
   trunk/ffmpeg.c

Modified: trunk/ffmpeg.c
==============================================================================
--- trunk/ffmpeg.c	Fri Jun 12 07:29:29 2009	(r19163)
+++ trunk/ffmpeg.c	Fri Jun 12 10:15:37 2009	(r19164)
@@ -1818,6 +1818,10 @@ static int av_encode(AVFormatContext **o
                 ost->encoding_needed = 1;
                 break;
             case CODEC_TYPE_VIDEO:
+                if (ost->st->codec->pix_fmt == PIX_FMT_NONE) {
+                    fprintf(stderr, "Video pixel format is unknown, stream cannot be decoded\n");
+                    av_exit(1);
+                }
                 ost->video_crop = ((frame_leftBand + frame_rightBand + frame_topBand + frame_bottomBand) != 0);
                 ost->video_pad = ((frame_padleft + frame_padright + frame_padtop + frame_padbottom) != 0);
                 ost->video_resample = ((codec->width != icodec->width -



More information about the ffmpeg-cvslog mailing list