[FFmpeg-cvslog] avcodec/fic: Don't copy frame unnecessarily

Andreas Rheinhardt git at videolan.org
Thu Jul 3 21:17:04 EEST 2025


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Mon Jun 23 03:59:37 2025 +0200| [12ae987a6a7d941d8252eb3e9b4e74445d1af0c1] | committer: Andreas Rheinhardt

avcodec/fic: Don't copy frame unnecessarily

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=12ae987a6a7d941d8252eb3e9b4e74445d1af0c1
---

 libavcodec/fic.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/fic.c b/libavcodec/fic.c
index bf7b2ead2b..2d1a2951ed 100644
--- a/libavcodec/fic.c
+++ b/libavcodec/fic.c
@@ -420,14 +420,14 @@ static int fic_decode_frame(AVCodecContext *avctx, AVFrame *rframe,
     if (ret < 0)
         return ret;
 
+    /* Draw cursor if needed. */
+    if (!skip_cursor) {
     /* Make sure we use a user-supplied buffer. */
     if ((ret = ff_reget_buffer(avctx, ctx->final_frame, 0)) < 0) {
         av_log(avctx, AV_LOG_ERROR, "Could not make frame writable.\n");
         return ret;
     }
 
-    /* Draw cursor. */
-    if (!skip_cursor) {
         fic_draw_cursor(avctx, src + CURSOR_OFFSET, cur_x, cur_y);
     }
 



More information about the ffmpeg-cvslog mailing list