Revision b0f33828

View differences:

libavcodec/roqvideodec.c
174 174
                            uint8_t *buf, int buf_size)
175 175
{
176 176
    RoqContext *s = avctx->priv_data;
177
    int copy= !s->current_frame->data[0];
177 178

  
178 179
    if (avctx->reget_buffer(avctx, s->current_frame)) {
179 180
        av_log(avctx, AV_LOG_ERROR, "  RoQ: get_buffer() failed\n");
180 181
        return -1;
181 182
    }
182 183

  
184
    if(copy)
185
        av_picture_copy((AVPicture*)s->current_frame, (AVPicture*)s->last_frame,
186
                        avctx->pix_fmt, avctx->width, avctx->height);
187

  
183 188
    s->buf = buf;
184 189
    s->size = buf_size;
185 190
    roqvideo_decode_frame(s);

Also available in: Unified diff