From 584acbf52425da9a4e249a25c9412466203ec683 Mon Sep 17 00:00:00 2001 From: Nicolas George Date: Tue, 14 Aug 2012 11:08:48 +0200 Subject: [PATCH] lavfi/movie: set pkt->stream_index for flushing. Otherwise, the value of stream_index is kept from the last packet read, which is not necessarily the stream that needs flushing. --- libavfilter/src_movie.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavfilter/src_movie.c b/libavfilter/src_movie.c index 09dfe5d214..4ec80b7a03 100644 --- a/libavfilter/src_movie.c +++ b/libavfilter/src_movie.c @@ -498,6 +498,7 @@ static int movie_push_frame(AVFilterContext *ctx, unsigned out_id) } return AVERROR_EOF; } + pkt->stream_index = movie->st[out_id].st->index; /* packet is already ready for flushing */ } else { ret = av_read_frame(movie->format_ctx, &movie->pkt0);