]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/4xm.c
h264: reset last_pocs on IDRs
[ffmpeg] / libavcodec / 4xm.c
index f2a82573b449bec7fae348a8ca7ca881d39a1ce8..9350f06e9b9e27eaff394ffa5f7e426cca2f4640 100644 (file)
@@ -279,7 +279,7 @@ static void init_mv(FourXContext *f){
     }
 #endif
 
-static inline void mcdc(uint16_t *dst, uint16_t *src, int log2w, int h, int stride, int scale, int dc){
+static inline void mcdc(uint16_t *dst, uint16_t *src, int log2w, int h, int stride, int scale, unsigned dc){
    int i;
    dc*= 0x10001;
 
@@ -821,7 +821,7 @@ static int decode_frame(AVCodecContext *avctx,
 
     avctx->flags |= CODEC_FLAG_EMU_EDGE; // alternatively we would have to use our own buffer management
 
-    p->reference= 1;
+    p->reference= 3;
     if (avctx->reget_buffer(avctx, p) < 0) {
         av_log(avctx, AV_LOG_ERROR, "reget_buffer() failed\n");
         return -1;
@@ -841,7 +841,7 @@ static int decode_frame(AVCodecContext *avctx,
         }
     }else if(frame_4cc == AV_RL32("pfrm") || frame_4cc == AV_RL32("pfr2")){
         if(!f->last_picture.data[0]){
-            f->last_picture.reference= 1;
+            f->last_picture.reference= 3;
             if(avctx->get_buffer(avctx, &f->last_picture) < 0){
                 av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
                 return -1;