From ac3d9b20c9a1b230f61d7128cd02bbd9a3d5bc1e Mon Sep 17 00:00:00 2001 From: John Stebbins Date: Fri, 25 Mar 2016 11:10:16 -0600 Subject: stream: fix negative array index --- libhb/stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libhb/stream.c') 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 ) { -- cgit v1.2.3