From: John Stebbins Date: Sun, 10 Feb 2019 19:08:53 +0000 (-0700) Subject: dvd: Add support for MPEG-1 on DVD X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=58a15a0dc83afb10dcd48eb428b707e268e320e8;p=handbrake dvd: Add support for MPEG-1 on DVD Use video attributes from IFO file to set video stream type. May fix https://github.com/HandBrake/HandBrake/issues/1880 --- diff --git a/libhb/dvd.c b/libhb/dvd.c index 97d875aaa..5708934bf 100644 --- a/libhb/dvd.c +++ b/libhb/dvd.c @@ -735,6 +735,24 @@ static hb_title_t * hb_dvdread_title_scan( hb_dvd_t * e, int t, uint64_t min_dur goto fail; } + switch( vts->vtsi_mat->vts_video_attr.mpeg_version ) + { + case 0: + title->video_codec = WORK_DECAVCODECV; + title->video_codec_param = AV_CODEC_ID_MPEG1VIDEO; + break; + case 1: + title->video_codec = WORK_DECAVCODECV; + title->video_codec_param = AV_CODEC_ID_MPEG2VIDEO; + break; + default: + hb_log("scan: unknown/reserved MPEG version %d", + vts->vtsi_mat->vts_video_attr.mpeg_version); + title->video_codec = WORK_DECAVCODECV; + title->video_codec_param = AV_CODEC_ID_MPEG2VIDEO; + break; + } + hb_log("scan: aspect = %d:%d", title->container_dar.num, title->container_dar.den); diff --git a/libhb/dvdnav.c b/libhb/dvdnav.c index 99602b5d8..5a3782cbb 100644 --- a/libhb/dvdnav.c +++ b/libhb/dvdnav.c @@ -928,6 +928,24 @@ static hb_title_t * hb_dvdnav_title_scan( hb_dvd_t * e, int t, uint64_t min_dura goto fail; } + switch( ifo->vtsi_mat->vts_video_attr.mpeg_version ) + { + case 0: + title->video_codec = WORK_DECAVCODECV; + title->video_codec_param = AV_CODEC_ID_MPEG1VIDEO; + break; + case 1: + title->video_codec = WORK_DECAVCODECV; + title->video_codec_param = AV_CODEC_ID_MPEG2VIDEO; + break; + default: + hb_log("scan: unknown/reserved MPEG version %d", + ifo->vtsi_mat->vts_video_attr.mpeg_version); + title->video_codec = WORK_DECAVCODECV; + title->video_codec_param = AV_CODEC_ID_MPEG2VIDEO; + break; + } + hb_log("scan: aspect = %d:%d", title->container_dar.num, title->container_dar.den);