1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

Print error message instead of crashing when combining -vcodec copy and -vhook.

patch by Matthijs Douze, Matthijs.Douze inrialpes fr

Originally committed as revision 7901 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Matthijs Douze 2007-02-09 17:45:28 +00:00 committed by Diego Biurrun
parent b2a581dc71
commit 8d74e55b83

View File

@ -1543,6 +1543,10 @@ static int av_encode(AVFormatContext **output_files,
codec->block_align= icodec->block_align;
break;
case CODEC_TYPE_VIDEO:
if(using_vhook) {
fprintf(stderr,"-vcodec copy and -vhook are incompatible (frames are not decoded)\n");
exit(1);
}
codec->pix_fmt = icodec->pix_fmt;
codec->width = icodec->width;
codec->height = icodec->height;