changeset 227:ec1bc02a0a47 libavcodec

avoid copying input when encoding non intra stuff too
author michaelni
date Thu, 07 Feb 2002 23:48:24 +0000
parents 5784987c3940
children 3c2bad70a196
files mpegvideo.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mpegvideo.c	Thu Feb 07 02:08:36 2002 +0000
+++ b/mpegvideo.c	Thu Feb 07 23:48:24 2002 +0000
@@ -470,16 +470,16 @@
             h >>= 1;
         }
 
-	if(s->intra_only && dest_wrap==src_wrap){
-	    s->current_picture[i] = pict->data[i];
+	if(dest_wrap==src_wrap){
+	    s->new_picture[i] = pict->data[i];
 	}else {
             for(j=0;j<h;j++) {
                 memcpy(dest, src, w);
                 dest += dest_wrap;
                 src += src_wrap;
             }
+            s->new_picture[i] = s->current_picture[i];
 	}
-        s->new_picture[i] = s->current_picture[i];
     }
 
     encode_picture(s, s->picture_number);