Change img_convert() from img_fmt to img_fmt with img_copy()
authorLuca Abeni <lucabe72@email.it>
Wed, 29 Mar 2006 08:25:09 +0000 (08:25 +0000)
committerLuca Abeni <lucabe72@email.it>
Wed, 29 Mar 2006 08:25:09 +0000 (08:25 +0000)
Originally committed as revision 5236 to svn://svn.ffmpeg.org/ffmpeg/trunk

ffmpeg.c

index e439bf2..69bb5f7 100644 (file)
--- 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;