Fix 1 pass RC in snow.
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 2 Dec 2009 20:07:23 +0000 (20:07 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 2 Dec 2009 20:07:23 +0000 (20:07 +0000)
Fixes issue547.

Originally committed as revision 20706 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/snow.c

index aeab1df..86c8639 100644 (file)
@@ -4451,6 +4451,8 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size,
     frame_start(s);
 
     s->m.current_picture_ptr= &s->m.current_picture;
+    s->m.last_picture.pts= s->m.current_picture.pts;
+    s->m.current_picture.pts= pict->pts;
     if(pict->pict_type == FF_P_TYPE){
         int block_width = (width +15)>>4;
         int block_height= (height+15)>>4;