summaryrefslogtreecommitdiffstats
path: root/libhb
diff options
context:
space:
mode:
authormidzer <[email protected]>2016-10-19 20:53:51 +0200
committerBradley Sepos <[email protected]>2016-12-14 11:29:23 -0500
commiteb5a5d63d233eaf87f0b2a13169465ac938ef6ff (patch)
treead05d395093f640899365a8766306e591c808c43 /libhb
parent14c2e61e3a4efe5ec508061b2e6bc702699662cb (diff)
libhb: Fix possible null pointer dereference in stream.c.
Diffstat (limited to 'libhb')
-rw-r--r--libhb/stream.c12
1 files 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.