all: Use av_frame_replace() where appropriate

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt
2023-09-07 12:02:26 +02:00
parent 0487786ffe
commit cfa47fd331
31 changed files with 34 additions and 67 deletions

View File

@@ -317,8 +317,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
return AVERROR_INVALIDDATA;
}
av_frame_unref(c->prev);
if ((ret = av_frame_ref(c->prev, frame)) < 0)
if ((ret = av_frame_replace(c->prev, frame)) < 0)
return ret;
*got_frame = 1;