From: jstebbins Date: Sun, 30 May 2010 18:22:32 +0000 (+0000) Subject: add check for reasonable vobsub width/height values when parsing out of mp4 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=798b6686b6d2ff04e008fffde84c0786e3865024;p=handbrake-jp%2Fhandbrake-jp-git.git add check for reasonable vobsub width/height values when parsing out of mp4 if the values aren't good, use default of 720x480 git-svn-id: svn://localhost/HandBrake/trunk@3338 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- diff --git a/libhb/stream.c b/libhb/stream.c index f4f5ae3f..35b705af 100644 --- a/libhb/stream.c +++ b/libhb/stream.c @@ -2928,8 +2928,16 @@ static int ffmpeg_parse_vobsub_extradata_mp4( AVCodecContext *codec, hb_subtitle codec->extradata[j+2] << 8 | // Cb codec->extradata[j+3] << 0; // Cr } - subtitle->width = codec->width; - subtitle->height = codec->height; + if (codec->width <= 0 || codec->height <= 0) + { + subtitle->width = 720; + subtitle->height = 480; + } + else + { + subtitle->width = codec->width; + subtitle->height = codec->height; + } return 0; }