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>
This commit is contained in:
@@ -2622,13 +2622,6 @@ static int send_frame(FilterGraph *fg, FilterGraphThread *fgt,
|
|||||||
break;
|
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 (sd = av_frame_get_side_data(frame, AV_FRAME_DATA_DISPLAYMATRIX)) {
|
||||||
if (!ifp->displaymatrix_present ||
|
if (!ifp->displaymatrix_present ||
|
||||||
memcmp(sd->data, ifp->displaymatrix, sizeof(ifp->displaymatrix)))
|
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)
|
} else if (ifp->displaymatrix_present)
|
||||||
need_reinit = 1;
|
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) {
|
if (need_reinit) {
|
||||||
ret = ifilter_parameters_from_frame(ifilter, frame);
|
ret = ifilter_parameters_from_frame(ifilter, frame);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user