diff --git a/ffmpeg.c b/ffmpeg.c
index e439bf2e833da09d756611da85536b1e4612326a..69bb5f73590949770da8456219898d85e8cf263e 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -626,13 +626,7 @@ static void pre_process_video_frame(AVInputStream *ist, AVPicture *picture, void
                 picture2 = picture;
             }
         } else {
-            if (img_convert(picture2, dec->pix_fmt, picture,
-                            dec->pix_fmt, dec->width, dec->height) < 0) {
-                /* if error, do not copy */
-                av_free(buf);
-                buf = NULL;
-                picture2 = picture;
-            }
+            img_copy(picture2, picture, dec->pix_fmt, dec->width, dec->height);
         }
     } else {
         picture2 = picture;