]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/fraps.c
Reinitialize the h264 decoder context on every valid aspect ratio
[ffmpeg] / libavcodec / fraps.c
index e5f8f49b28edffc80a96ca627b21819bda0624fa..da1bf0dd723c61ba7589e47c2804a86d53f56f21 100644 (file)
@@ -63,7 +63,6 @@ static av_cold int decode_init(AVCodecContext *avctx)
     avctx->pix_fmt= PIX_FMT_NONE; /* set in decode_frame */
 
     s->avctx = avctx;
-    s->frame.data[0] = NULL;
     s->tmpbuf = NULL;
 
     dsputil_init(&s->dsp, avctx);
@@ -240,7 +239,7 @@ static int decode_frame(AVCodecContext *avctx,
             for(y=0; y<avctx->height; y++)
                 memcpy(&f->data[0][ (avctx->height-y)*f->linesize[0] ],
                        &buf[y*avctx->width*3],
-                       f->linesize[0]);
+                       3*avctx->width);
         }
         break;