diff options
author | jstebbins <[email protected]> | 2010-09-14 23:08:57 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2010-09-14 23:08:57 +0000 |
commit | be3a03fca39d47d391efa36894124fc2e87eb5de (patch) | |
tree | b2661619896ca99e33ebfd33f2f9f0b20fe1245c /libhb/stream.c | |
parent | 919590e39871a63b726ee47cd705b7754a469b91 (diff) |
fix a crash when a TS has no aspect ratio set in the video stream
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3529 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/stream.c')
-rw-r--r-- | libhb/stream.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libhb/stream.c b/libhb/stream.c index 9166ace41..58b2506f0 100644 --- a/libhb/stream.c +++ b/libhb/stream.c @@ -2875,6 +2875,9 @@ static void ffmpeg_remap_stream( hb_stream_t *stream, hb_title_t *title ) void *hb_ffmpeg_context( int codec_param ) { + if ( ffmpeg_streams == NULL ) + return NULL; + int slot = codec_param & (ffmpeg_sl_size - 1); int stream_index = codec_param >> ffmpeg_sl_bits; return ffmpeg_streams[slot]->ffmpeg_ic->streams[stream_index]->codec; @@ -2882,6 +2885,9 @@ void *hb_ffmpeg_context( int codec_param ) void *hb_ffmpeg_avstream( int codec_param ) { + if ( ffmpeg_streams == NULL ) + return NULL; + int slot = codec_param & (ffmpeg_sl_size - 1); int stream_index = codec_param >> ffmpeg_sl_bits; return ffmpeg_streams[slot]->ffmpeg_ic->streams[stream_index]; |