diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2018-11-13 20:29:40 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2018-11-16 18:21:27 +0100 |
commit | 3c4a874388a903abc03954c9d5220a47a5e11df6 (patch) | |
tree | 3bca2d3ebce9db855247e94c8a072596be3f4d8b | |
parent | 26610256798174b0216ae807d92af3e712b99040 (diff) | |
download | ffmpeg-3c4a874388a903abc03954c9d5220a47a5e11df6.tar.gz |
fftools/ffmpeg: Repair reinit_filter feature
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 35040048793bc5d19942277fe17d1235e915a7d8)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | ffmpeg.c | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -2154,9 +2154,6 @@ static int ifilter_send_frame(InputFilter *ifilter, AVFrame *frame) /* determine if the parameters for this input changed */ need_reinit = ifilter->format != frame->format; - if (!!ifilter->hw_frames_ctx != !!frame->hw_frames_ctx || - (ifilter->hw_frames_ctx && ifilter->hw_frames_ctx->data != frame->hw_frames_ctx->data)) - need_reinit = 1; switch (ifilter->ist->st->codecpar->codec_type) { case AVMEDIA_TYPE_AUDIO: @@ -2170,6 +2167,13 @@ static int ifilter_send_frame(InputFilter *ifilter, AVFrame *frame) break; } + if (!ifilter->ist->reinit_filters && fg->graph) + need_reinit = 0; + + if (!!ifilter->hw_frames_ctx != !!frame->hw_frames_ctx || + (ifilter->hw_frames_ctx && ifilter->hw_frames_ctx->data != frame->hw_frames_ctx->data)) + need_reinit = 1; + if (need_reinit) { ret = ifilter_parameters_from_frame(ifilter, frame); if (ret < 0) |