summaryrefslogtreecommitdiffstats
path: root/libhb/stream.c
diff options
context:
space:
mode:
Diffstat (limited to 'libhb/stream.c')
-rw-r--r--libhb/stream.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libhb/stream.c b/libhb/stream.c
index 4dd4a4e2a..ede9f33d3 100644
--- a/libhb/stream.c
+++ b/libhb/stream.c
@@ -4365,13 +4365,19 @@ static void hb_ts_resolve_pid_types(hb_stream_t *stream)
total_size += buf->size;
if ( total_size > HB_MAX_PROBE_SIZE * 2 )
+ {
+ hb_buffer_close(&buf);
break;
+ }
int idx;
idx = index_of_id( stream, buf->s.id );
if (idx < 0 || stream->pes.list[idx].stream_kind != U )
+ {
+ hb_buffer_close(&buf);
continue;
+ }
hb_pes_stream_t *pes = &stream->pes.list[idx];
@@ -4389,6 +4395,7 @@ static void hb_ts_resolve_pid_types(hb_stream_t *stream)
pes->codec_name, pes->stream_id, pes->stream_id_ext);
}
}
+ hb_buffer_close(&buf);
}
// Clean up any probe buffers and set all remaining unknown
// streams to 'kind' N