summaryrefslogtreecommitdiff
path: root/ffplay.c
diff options
context:
space:
mode:
authorMarton Balint <cus@passwd.hu>2014-01-29 23:00:52 +0100
committerMarton Balint <cus@passwd.hu>2014-02-05 00:00:23 +0100
commitcec6dec7c8b248b101646940af1b0893564dba26 (patch)
tree5388dc1a4aa846e2d0e9a49c5d7fc382afd0c00e /ffplay.c
parent20be510887d0985c370957371025d5d7f721bb79 (diff)
ffplay: reorder the filters to ensure that inputs of the custom filters are merged first
For more info see http://ffmpeg.org/pipermail/ffmpeg-user/2013-December/018761.html Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'ffplay.c')
-rw-r--r--ffplay.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/ffplay.c b/ffplay.c
index d8dcf84c13..0e173dc8a0 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -1727,7 +1727,8 @@ static int get_video_frame(VideoState *is, AVFrame *frame, AVPacket *pkt, int *s
static int configure_filtergraph(AVFilterGraph *graph, const char *filtergraph,
AVFilterContext *source_ctx, AVFilterContext *sink_ctx)
{
- int ret;
+ int ret, i;
+ int nb_filters = graph->nb_filters;
AVFilterInOut *outputs = NULL, *inputs = NULL;
if (filtergraph) {
@@ -1755,6 +1756,10 @@ static int configure_filtergraph(AVFilterGraph *graph, const char *filtergraph,
goto fail;
}
+ /* Reorder the filters to ensure that inputs of the custom filters are merged first */
+ for (i = 0; i < graph->nb_filters - nb_filters; i++)
+ FFSWAP(AVFilterContext*, graph->filters[i], graph->filters[i + nb_filters]);
+
ret = avfilter_graph_config(graph, NULL);
fail:
avfilter_inout_free(&outputs);