[FFmpeg-cvslog] Add CPiA video decoder

Reimar Döffinger Reimar.Doeffinger at gmx.de
Fri Aug 31 18:22:27 CEST 2012


Sorry for being late in commenting.

> +    // Get buffer filled with previous frame
> +    if ((ret = avctx->reget_buffer(avctx, frame)) < 0) {
> +        av_log(avctx, AV_LOG_ERROR, "reget_buffer() failed!\n");
> +        return ret;
> +    }
[...]
> +    if (header[28] == NOT_COMPRESSED) {
> +        frame->pict_type = AV_PICTURE_TYPE_I;
> +        frame->key_frame = 1;
> +    } else {
> +        frame->pict_type = AV_PICTURE_TYPE_P;
> +        frame->key_frame = 0;
> +    }

Shouldn't this be set before reget_buffer?
Or rather better, reget_buffer moved after it, so as to avoid
getting a buffer and right after bailing out due to header errors,
which is at least a bit ugly.


More information about the ffmpeg-cvslog mailing list