summaryrefslogtreecommitdiffstats
path: root/libhb/decavcodec.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2014-01-31 15:49:40 +0000
committerjstebbins <[email protected]>2014-01-31 15:49:40 +0000
commit9c8fb1dd045d6cc5f62820c8e5876152f2d923ee (patch)
tree5cfe57a5d0ec7f1d6f7d7f852745ca38d4301d80 /libhb/decavcodec.c
parent68ba6d3fefed56fdc3baeae234aadc53d87c809c (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
Diffstat (limited to 'libhb/decavcodec.c')
-rw-r--r--libhb/decavcodec.c3
1 files changed, 3 insertions, 0 deletions
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