aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-02-05 14:12:46 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-02-05 14:12:50 +0100
commit95b13fb96f7e46239b754108d077e76296f9bd27 (patch)
tree61e1f23495e0f0accb8b48b9d50e5bf909c83d7e
parentd92a725329e5fe315fd42ab1ef38a97aa8f94aba (diff)
parent23e77f0e33b706ffdcf31a22189a61f1283aaa18 (diff)
downloadffmpeg-95b13fb96f7e46239b754108d077e76296f9bd27.tar.gz
Merge remote-tracking branch 'cus/stable'
* cus/stable: ffplay: flush subtitle codecs as well with null packets ffplay: reorder the filters to ensure that inputs of the custom filters are merged first Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--ffplay.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/ffplay.c b/ffplay.c
index d8dcf84c13..b161e8c23a 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);
@@ -2943,6 +2948,8 @@ static int read_thread(void *arg)
packet_queue_put_nullpacket(&is->videoq, is->video_stream);
if (is->audio_stream >= 0)
packet_queue_put_nullpacket(&is->audioq, is->audio_stream);
+ if (is->subtitle_stream >= 0)
+ packet_queue_put_nullpacket(&is->subtitleq, is->subtitle_stream);
SDL_Delay(10);
eof=0;
continue;