Commit 67d3f529 authored by Nicolas George's avatar Nicolas George

lavfi/fifo: do not assume request_frame() returns a frame.

parent 79c1be12
...@@ -201,7 +201,8 @@ static int return_audio_frame(AVFilterContext *ctx) ...@@ -201,7 +201,8 @@ static int return_audio_frame(AVFilterContext *ctx)
break; break;
} else if (ret < 0) } else if (ret < 0)
return ret; return ret;
av_assert0(s->root.next); // If ff_request_frame() succeeded then we should have a frame if (!s->root.next)
return 0;
} }
head = s->root.next->frame; head = s->root.next->frame;
...@@ -237,7 +238,8 @@ static int request_frame(AVFilterLink *outlink) ...@@ -237,7 +238,8 @@ static int request_frame(AVFilterLink *outlink)
return return_audio_frame(outlink->src); return return_audio_frame(outlink->src);
return ret; return ret;
} }
av_assert0(fifo->root.next); if (!fifo->root.next)
return 0;
} }
if (outlink->request_samples) { if (outlink->request_samples) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment