[FFmpeg-cvslog] avconv: move flushing the queued frames to configure_filtergraph()
Anton Khirnov
git at videolan.org
Sun Nov 13 23:34:43 EET 2016
ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Mon Jun 27 18:59:23 2016 +0200| [d2e56cf753a6c462041dee897d9d0c90f349988c] | committer: Anton Khirnov
avconv: move flushing the queued frames to configure_filtergraph()
This is a more appropriate place for it, and will also be useful in the
following commit.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d2e56cf753a6c462041dee897d9d0c90f349988c
---
avconv.c | 11 -----------
avconv_filter.c | 11 +++++++++++
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/avconv.c b/avconv.c
index 4eae015..778de65 100644
--- a/avconv.c
+++ b/avconv.c
@@ -1231,17 +1231,6 @@ static int ifilter_send_frame(InputFilter *ifilter, AVFrame *frame)
av_log(NULL, AV_LOG_ERROR, "Error reinitializing filters!\n");
return ret;
}
-
- for (i = 0; i < fg->nb_inputs; i++) {
- while (av_fifo_size(fg->inputs[i]->frame_queue)) {
- AVFrame *tmp;
- av_fifo_generic_read(fg->inputs[i]->frame_queue, &tmp, sizeof(tmp), NULL);
- ret = av_buffersrc_add_frame(fg->inputs[i]->filter, tmp);
- av_frame_free(&tmp);
- if (ret < 0)
- return ret;
- }
- }
}
ret = av_buffersrc_add_frame(ifilter->filter, frame);
diff --git a/avconv_filter.c b/avconv_filter.c
index f7ce76f..1acbd88 100644
--- a/avconv_filter.c
+++ b/avconv_filter.c
@@ -769,6 +769,17 @@ int configure_filtergraph(FilterGraph *fg)
ofilter->channel_layout = link->channel_layout;
}
+ for (i = 0; i < fg->nb_inputs; i++) {
+ while (av_fifo_size(fg->inputs[i]->frame_queue)) {
+ AVFrame *tmp;
+ av_fifo_generic_read(fg->inputs[i]->frame_queue, &tmp, sizeof(tmp), NULL);
+ ret = av_buffersrc_add_frame(fg->inputs[i]->filter, tmp);
+ av_frame_free(&tmp);
+ if (ret < 0)
+ return ret;
+ }
+ }
+
return 0;
}
More information about the ffmpeg-cvslog
mailing list