diff options
author | jstebbins <[email protected]> | 2013-06-30 21:15:15 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2013-06-30 21:15:15 +0000 |
commit | e3837712e452a474a85f4dfa0371c9b0f84909b0 (patch) | |
tree | d966e628672a11f45cf9906ad8e74124692a9b93 | |
parent | ba3674603258b9bd9662af2b8f2225f9e9395ca1 (diff) |
libhb: fix crash in muxmp4.c
I must not have gone back and retested this :-\
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5622 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r-- | libhb/muxmp4.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/libhb/muxmp4.c b/libhb/muxmp4.c index e544c26be..5c90325af 100644 --- a/libhb/muxmp4.c +++ b/libhb/muxmp4.c @@ -668,14 +668,17 @@ static int MP4Mux( hb_mux_object_t * m, hb_mux_data_t * mux_data, int64_t offset = 0; hb_buffer_t *tmp; - if (buf->s.duration >= 0) + if (buf != NULL) { - stop = buf->s.start + buf->s.duration; - } - else if (mux_data->subtitle) - { - buf->s.duration = 10 * 90000; - stop = buf->s.start + buf->s.duration; + if (buf->s.duration >= 0) + { + stop = buf->s.start + buf->s.duration; + } + else if (mux_data->subtitle) + { + buf->s.duration = 10 * 90000; + stop = buf->s.start + buf->s.duration; + } } if( mux_data == job->mux_data ) @@ -701,6 +704,8 @@ static int MP4Mux( hb_mux_object_t * m, hb_mux_data_t * mux_data, if ( !buf ) return 0; + stop = buf->s.start + buf->s.duration; + if( job->vcodec == HB_VCODEC_X264 || ( job->vcodec & HB_VCODEC_FFMPEG_MASK ) ) { |