X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=libhb%2Fdecavcodec.c;h=abf7ed179f8cee5a86ca44e56d4d414f8fcf6271;hb=4b72a63eb61a01275493c4bfb51ba02152d1c5e1;hp=f5c46699e6925a589a5d3480176905f60a871319;hpb=ce896720aa80b4bd7002c5d65a24323125e99fd1;p=handbrake-jp%2Fhandbrake-jp-git.git diff --git a/libhb/decavcodec.c b/libhb/decavcodec.c index f5c46699..abf7ed17 100644 --- a/libhb/decavcodec.c +++ b/libhb/decavcodec.c @@ -977,10 +977,11 @@ static int decavcodecvInfo( hb_work_object_t *w, hb_work_info_t *info ) if ( info->pixel_aspect_width == 0 || info->pixel_aspect_height == 0 ) { + // There will not be an ffmpeg stream if the file is TS AVStream *st = hb_ffmpeg_avstream( w->codec_param ); - info->pixel_aspect_width = st->sample_aspect_ratio.num ? - st->sample_aspect_ratio.num : 1; - info->pixel_aspect_height = st->sample_aspect_ratio.den ? + info->pixel_aspect_width = st && st->sample_aspect_ratio.num ? + st->sample_aspect_ratio.num : 1; + info->pixel_aspect_height = st && st->sample_aspect_ratio.den ? st->sample_aspect_ratio.den : 1; } /* ffmpeg returns the Pixel Aspect Ratio (PAR). Handbrake wants the