]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/eatgv.c
Merge remote-tracking branch 'shariman/wmall'
[ffmpeg] / libavcodec / eatgv.c
index 26bf524339faacefe1aa391eb66930832b433ae3..91ae94c46a3860d52eb21316bf4da86fa09f5839 100644 (file)
@@ -278,7 +278,7 @@ static int tgv_decode_frame(AVCodecContext *avctx,
         pal_count = AV_RL16(&buf[6]);
         buf += 12;
         for(i=0; i<pal_count && i<AVPALETTE_COUNT && buf_end - buf >= 3; i++) {
-            s->palette[i] = AV_RB24(buf);
+            s->palette[i] = 0xFF << 24 | AV_RB24(buf);
             buf += 3;
         }
     }
@@ -289,7 +289,7 @@ static int tgv_decode_frame(AVCodecContext *avctx,
     /* shuffle */
     FFSWAP(AVFrame, s->frame, s->last_frame);
     if (!s->frame.data[0]) {
-        s->frame.reference = 1;
+        s->frame.reference = 3;
         s->frame.buffer_hints = FF_BUFFER_HINTS_VALID;
         s->frame.linesize[0] = s->width;