diff options
author | Anton Khirnov <anton@khirnov.net> | 2012-07-08 17:29:42 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2012-07-22 09:14:04 +0200 |
commit | ebc8d974817fe456a0afe6867fdeb22c761fb04f (patch) | |
tree | d08864445a712ca289ef8a1b2a4fa4d7ff2e81e0 /libavfilter/fifo.c | |
parent | 1470ce21cec5ee26e106e2a884c26bbf84e5aaea (diff) | |
download | ffmpeg-ebc8d974817fe456a0afe6867fdeb22c761fb04f.tar.gz |
lavfi: add error handling to start_frame().
Diffstat (limited to 'libavfilter/fifo.c')
-rw-r--r-- | libavfilter/fifo.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/libavfilter/fifo.c b/libavfilter/fifo.c index cbe1e5ef73..185960ebc7 100644 --- a/libavfilter/fifo.c +++ b/libavfilter/fifo.c @@ -76,6 +76,7 @@ static int add_to_queue(AVFilterLink *inlink, AVFilterBufferRef *buf) { FifoContext *fifo = inlink->dst->priv; + inlink->cur_buf = NULL; fifo->last->next = av_mallocz(sizeof(Buf)); if (!fifo->last->next) { avfilter_unref_buffer(buf); @@ -88,12 +89,6 @@ static int add_to_queue(AVFilterLink *inlink, AVFilterBufferRef *buf) return 0; } -static void start_frame(AVFilterLink *inlink, AVFilterBufferRef *buf) -{ - add_to_queue(inlink, buf); - inlink->cur_buf = NULL; -} - static void queue_pop(FifoContext *s) { Buf *tmp = s->root.next->next; @@ -272,7 +267,7 @@ AVFilter avfilter_vf_fifo = { .inputs = (const AVFilterPad[]) {{ .name = "default", .type = AVMEDIA_TYPE_VIDEO, .get_video_buffer= ff_null_get_video_buffer, - .start_frame = start_frame, + .start_frame = add_to_queue, .draw_slice = draw_slice, .end_frame = end_frame, .rej_perms = AV_PERM_REUSE2, }, |