diff options
author | jstebbins <[email protected]> | 2014-01-31 15:49:40 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2014-01-31 15:49:40 +0000 |
commit | 9c8fb1dd045d6cc5f62820c8e5876152f2d923ee (patch) | |
tree | 5cfe57a5d0ec7f1d6f7d7f852745ca38d4301d80 | |
parent | 68ba6d3fefed56fdc3baeae234aadc53d87c809c (diff) |
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
-rw-r--r-- | libhb/bd.c | 1 | ||||
-rw-r--r-- | libhb/decavcodec.c | 3 |
2 files changed, 3 insertions, 1 deletions
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 |