1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-04 22:03:09 +02:00

ffmpeg-filter: check for initialized graph

Don't drop frame if graph hasn't been initialized yet!
This commit is contained in:
Gyan Doshi
2025-03-25 01:03:06 +05:30
parent 044664ac3b
commit 8b2372cac7

View File

@ -2900,7 +2900,7 @@ static int send_frame(FilterGraph *fg, FilterGraphThread *fgt,
} else if (ifp->downmixinfo_present)
need_reinit |= DOWNMIX_CHANGED;
if (need_reinit && (ifp->opts.flags & IFILTER_FLAG_DROPCHANGED)) {
if (need_reinit && fgt->graph && (ifp->opts.flags & IFILTER_FLAG_DROPCHANGED)) {
ifp->nb_dropped++;
av_log_once(fg, AV_LOG_WARNING, AV_LOG_DEBUG, &ifp->drop_warned, "Avoiding reinit; dropping frame pts: %s bound for %s\n", av_ts2str(frame->pts), ifilter->name);
av_frame_unref(frame);