diff options
author | Marton Balint <cus@passwd.hu> | 2023-12-29 16:33:30 +0100 |
---|---|---|
committer | Marton Balint <cus@passwd.hu> | 2024-01-07 22:47:22 +0100 |
commit | 324be730fce5d0e96bcdec9ec5d09551ec7ffd60 (patch) | |
tree | 93dcbf8ba687dfec70045e9df32decef8dcd2740 | |
parent | 363b3ec98a0fd49ca9144ac1b16c272a14e1b0df (diff) | |
download | ffmpeg-324be730fce5d0e96bcdec9ec5d09551ec7ffd60.tar.gz |
fftools/ffmpeg_filter: honor -reinit_filters 0 even on changed display matrix
Not sure about honoring it also in case of a hwaccel change, so left that as is
for now.
Signed-off-by: Marton Balint <cus@passwd.hu>
-rw-r--r-- | fftools/ffmpeg_filter.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c index 7b8d6a5a38..1a58ec278a 100644 --- a/fftools/ffmpeg_filter.c +++ b/fftools/ffmpeg_filter.c @@ -2622,13 +2622,6 @@ static int send_frame(FilterGraph *fg, FilterGraphThread *fgt, break; } - if (!ifp->ist->reinit_filters && fgt->graph) - need_reinit = 0; - - if (!!ifp->hw_frames_ctx != !!frame->hw_frames_ctx || - (ifp->hw_frames_ctx && ifp->hw_frames_ctx->data != frame->hw_frames_ctx->data)) - need_reinit = 1; - if (sd = av_frame_get_side_data(frame, AV_FRAME_DATA_DISPLAYMATRIX)) { if (!ifp->displaymatrix_present || memcmp(sd->data, ifp->displaymatrix, sizeof(ifp->displaymatrix))) @@ -2636,6 +2629,13 @@ static int send_frame(FilterGraph *fg, FilterGraphThread *fgt, } else if (ifp->displaymatrix_present) need_reinit = 1; + if (!ifp->ist->reinit_filters && fgt->graph) + need_reinit = 0; + + if (!!ifp->hw_frames_ctx != !!frame->hw_frames_ctx || + (ifp->hw_frames_ctx && ifp->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) |