From: jstebbins Date: Fri, 31 Jan 2014 15:49:40 +0000 (+0000) Subject: libhb: fix crashes with some BDs X-Git-Tag: 0.10.0~522 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9c8fb1dd045d6cc5f62820c8e5876152f2d923ee;p=handbrake libhb: fix crashes with some BDs A stray line of code from the switch from mpeg2dec to libavcodec caused a failure to open the mpeg2 decoder for BDs git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6009 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- diff --git a/libhb/bd.c b/libhb/bd.c index 3f2a0df1c..37c9c5c7e 100644 --- a/libhb/bd.c +++ b/libhb/bd.c @@ -339,7 +339,6 @@ hb_title_t * hb_bd_title_scan( hb_bd_t * d, int tt, uint64_t min_duration ) case BLURAY_STREAM_TYPE_VIDEO_MPEG2: title->video_codec = WORK_DECAVCODECV; title->video_codec_param = AV_CODEC_ID_MPEG2VIDEO; - title->video_codec_param = 0; break; case BLURAY_STREAM_TYPE_VIDEO_VC1: diff --git a/libhb/decavcodec.c b/libhb/decavcodec.c index b94168724..b4daf3cdc 100644 --- a/libhb/decavcodec.c +++ b/libhb/decavcodec.c @@ -1953,6 +1953,9 @@ static int decavcodecvInfo( hb_work_object_t *w, hb_work_info_t *info ) memset( info, 0, sizeof(*info) ); + if (pv->context == NULL) + return 0; + info->bitrate = pv->context->bit_rate; // HandBrake's video pipeline uses yuv420 color. This means all // dimensions must be even. So we must adjust the dimensions