Revision 1d768c3c

View differences:

libavcodec/msrle.c
67 67
    int row_ptr = (s->avctx->height - 1) * row_dec;
68 68
    int frame_size = row_dec * s->avctx->height;
69 69

  
70
    /* make the palette available */
71
    memcpy(s->frame.data[1], s->avctx->palctrl->palette, AVPALETTE_SIZE);
72
    if (s->avctx->palctrl->palette_changed) {
73
        s->frame.palette_has_changed = 1;
74
        s->avctx->palctrl->palette_changed = 0;
75
    }
76

  
70 77
    while (row_ptr >= 0) {
71 78
        FETCH_NEXT_STREAM_BYTE();
72 79
        rle_code = stream_byte;
......
128 135
        }
129 136
    }
130 137

  
131
    /* make the palette available */
132
    memcpy(s->frame.data[1], s->avctx->palctrl->palette, AVPALETTE_SIZE);
133
    if (s->avctx->palctrl->palette_changed) {
134
        s->frame.palette_has_changed = 1;
135
        s->avctx->palctrl->palette_changed = 0;
136
    }
137

  
138 138
    /* one last sanity check on the way out */
139 139
    if (stream_ptr < s->size)
140 140
        av_log(s->avctx, AV_LOG_ERROR, " MS RLE: ended frame decode with bytes left over (%d < %d)\n",

Also available in: Unified diff