summaryrefslogtreecommitdiffstats
path: root/libhb/stream.c
diff options
context:
space:
mode:
authorJohn Stebbins <[email protected]>2016-03-25 11:10:16 -0600
committerJohn Stebbins <[email protected]>2016-03-25 11:10:16 -0600
commitac3d9b20c9a1b230f61d7128cd02bbd9a3d5bc1e (patch)
treebf475890d820fca9fb9e235c8a0f22c100207e7a /libhb/stream.c
parent758923ed275a3023760d3cf184103618ac68946d (diff)
stream: fix negative array index
Diffstat (limited to 'libhb/stream.c')
-rw-r--r--libhb/stream.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libhb/stream.c b/libhb/stream.c
index 261d50f84..37edd62d3 100644
--- a/libhb/stream.c
+++ b/libhb/stream.c
@@ -1479,7 +1479,7 @@ static hb_buffer_t * hb_ps_stream_getVideo(
idx = index_of_ps_stream( stream, pes_info.stream_id,
pes_info.stream_id_ext );
}
- if ( stream->pes.list[idx].stream_kind == V )
+ if ( idx >= 0 && stream->pes.list[idx].stream_kind == V )
{
if ( pes_info.pts != AV_NOPTS_VALUE )
{