From eb5a5d63d233eaf87f0b2a13169465ac938ef6ff Mon Sep 17 00:00:00 2001 From: midzer Date: Wed, 19 Oct 2016 20:53:51 +0200 Subject: [PATCH] libhb: Fix possible null pointer dereference in stream.c. --- libhb/stream.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libhb/stream.c b/libhb/stream.c index aef2144bd..cbddb4cfa 100644 --- a/libhb/stream.c +++ b/libhb/stream.c @@ -1737,17 +1737,17 @@ int64_t ffmpeg_initial_timestamp( hb_stream_t * stream ) int hb_stream_seek_chapter( hb_stream_t * stream, int chapter_num ) { - - if ( stream->hb_stream_type != ffmpeg ) - { - // currently meaningliess for transport and program streams - return 1; - } if ( !stream || !stream->title || chapter_num > hb_list_count( stream->title->list_chapter ) ) { return 0; } + + if ( stream->hb_stream_type != ffmpeg ) + { + // currently meaningless for transport and program streams + return 1; + } // TODO: add chapter start time to hb_chapter_t // The first chapter does not necessarily start at time 0. -- 2.40.0