This might help coverity
Showing the changes to libavfilter/avfiltergraph.c (1 of 1 file). Show all
Unified · Split
| @@ -1280,6 +1280,8 @@ static void heap_bubble_up(AVFilterGraph *graph, · 1279 unmodified lines | ||
| 1280 | 1280 | { |
| 1281 | 1281 | AVFilterLink **links = graph->sink_links; |
| 1282 | 1282 | |
| 1283 | + av_assert0(index >= 0); | |
| 1284 | + | |
| 1283 | 1285 | while (index) { |
| 1284 | 1286 | int parent = (index - 1) >> 1; |
| 1285 | 1287 | if (links[parent]->current_pts >= link->current_pts) |
| @@ -1297,6 +1299,8 @@ static void heap_bubble_down(AVFilterGraph *graph, · 11 unmodified lines | ||
| 1297 | 1299 | { |
| 1298 | 1300 | AVFilterLink **links = graph->sink_links; |
| 1299 | 1301 | |
| 1302 | + av_assert0(index >= 0); | |
| 1303 | + | |
| 1300 | 1304 | while (1) { |
| 1301 | 1305 | int child = 2 * index + 1; |
| 1302 | 1306 | if (child >= graph->sink_links_count) |