summaryrefslogtreecommitdiff
path: root/fftools
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2018-11-13 20:29:40 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2018-11-16 10:13:42 +0100
commit35040048793bc5d19942277fe17d1235e915a7d8 (patch)
tree4eca5669b14014219391b3934770f1c2b4a26cdf /fftools
parentd6b1248fc6aa17dd03cb41403c70c85183078fd2 (diff)
downloadffmpeg-35040048793bc5d19942277fe17d1235e915a7d8.tar.gz
fftools/ffmpeg: Repair reinit_filter feature
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'fftools')
-rw-r--r--fftools/ffmpeg.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index 38c21e944a..a12208cce9 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -2132,9 +2132,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:
@@ -2148,6 +2145,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)