diff options
Diffstat (limited to 'libavfilter/avfiltergraph.c')
-rw-r--r-- | libavfilter/avfiltergraph.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c index a859ecbde9..2e69cdd2d7 100644 --- a/libavfilter/avfiltergraph.c +++ b/libavfilter/avfiltergraph.c @@ -1280,6 +1280,8 @@ static void heap_bubble_up(AVFilterGraph *graph, { AVFilterLink **links = graph->sink_links; + av_assert0(index >= 0); + while (index) { int parent = (index - 1) >> 1; if (links[parent]->current_pts >= link->current_pts) @@ -1297,6 +1299,8 @@ static void heap_bubble_down(AVFilterGraph *graph, { AVFilterLink **links = graph->sink_links; + av_assert0(index >= 0); + while (1) { int child = 2 * index + 1; if (child >= graph->sink_links_count) |