summaryrefslogtreecommitdiff
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2009-06-12 08:15:37 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2009-06-12 08:15:37 +0000
commit761c8c923ea918c15fc503269a370d040f0d884d (patch)
tree12e848e48fe8a4f10bd56322ea84b4a9791d7009 /ffmpeg.c
parent94d3d6a468b0cba859157f12959b6b82b4fc6c79 (diff)
Fail and print correct error message when video stream pixel format
is unknown. Originally committed as revision 19164 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 1c734c3f84..dcba31f17a 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1818,6 +1818,10 @@ static int av_encode(AVFormatContext **output_files,
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 -