summaryrefslogtreecommitdiffstats
path: root/libhb/stream.c
diff options
context:
space:
mode:
authorDamiano Galassi <[email protected]>2018-01-12 20:54:08 +0100
committerDamiano Galassi <[email protected]>2018-01-12 20:55:14 +0100
commit696ebe518b38bb186e7f6692f91a3c799f3c838c (patch)
treeecc88a4c55f1a5c0414f57fb175149b1fe8c9d3b /libhb/stream.c
parent9bd2b8e50ca2e8e0b52580714b54dbca33b809a5 (diff)
libhb: fix a number of issues reported by clang.
Diffstat (limited to 'libhb/stream.c')
-rw-r--r--libhb/stream.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/libhb/stream.c b/libhb/stream.c
index bfc5dbc04..326cb0e4b 100644
--- a/libhb/stream.c
+++ b/libhb/stream.c
@@ -813,6 +813,12 @@ static void prune_streams(hb_stream_t *d)
hb_stream_t *
hb_stream_open(hb_handle_t *h, char *path, hb_title_t *title, int scan)
{
+ if (title == NULL)
+ {
+ hb_log("hb_stream_open: title is null");
+ return NULL;
+ }
+
FILE *f = hb_fopen(path, "rb");
if ( f == NULL )
{
@@ -828,7 +834,7 @@ hb_stream_open(hb_handle_t *h, char *path, hb_title_t *title, int scan)
return NULL;
}
- if( title && !( title->flags & HBTF_NO_IDR ) )
+ if (!(title->flags & HBTF_NO_IDR))
{
d->has_IDRs = 1;
}
@@ -2899,10 +2905,10 @@ static int decode_PAT(const uint8_t *buf, hb_stream_t *stream)
}
}
- pos += 3 + section_len;
+// pos += 3 + section_len;
}
- tablepos = 0;
+// tablepos = 0;
}
return 1;
}