From c17be817637ade85fb5d8138e8f402e67b51ac23 Mon Sep 17 00:00:00 2001
From: Luca Abeni <lucabe72@email.it>
Date: Wed, 29 Mar 2006 08:25:09 +0000
Subject: [PATCH] Change img_convert() from img_fmt to img_fmt with img_copy()

Originally committed as revision 5236 to svn://svn.ffmpeg.org/ffmpeg/trunk
---
 ffmpeg.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/ffmpeg.c b/ffmpeg.c
index e439bf2e833..69bb5f73590 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;
-- 
GitLab