On Fri, Oct 19, 2012 at 12:16:34PM +0200, Luca Barbato wrote:
> ---
>  libavcodec/ffv1dec.c | 53 
> ++++++++++++++++++++++++++--------------------------
>  libavcodec/ffv1enc.c | 26 +++++++++++++-------------
>  2 files changed, 40 insertions(+), 39 deletions(-)
> 
> diff --git a/libavcodec/ffv1dec.c b/libavcodec/ffv1dec.c
> index 6877b78..c05c3a0 100644
> --- a/libavcodec/ffv1dec.c
> +++ b/libavcodec/ffv1dec.c
> @@ -441,19 +441,19 @@ static int read_header(FFV1Context *f)
>                  break;
>              default:
>                  av_log(f->avctx, AV_LOG_ERROR, "format not supported\n");
> -                return -1;
> +                return AVERROR(ENOSYS);
>              }
>          }
>      } else if (f->colorspace == 1) {
>          if (f->chroma_h_shift || f->chroma_v_shift) {
>              av_log(f->avctx, AV_LOG_ERROR,
>                     "chroma subsampling not supported in this colorspace\n");
> -            return -1;
> +            return AVERROR(ENOSYS);
>          }
>          f->avctx->pix_fmt = AV_PIX_FMT_RGB32;
>      } else {
>          av_log(f->avctx, AV_LOG_ERROR, "colorspace not supported\n");
> -        return -1;
> +        return AVERROR(ENOSYS);
>      }
>  
>      av_dlog(f->avctx, "%d %d %d\n",

might be a bit bikesheddy but this code is fine with me

> @@ -561,10 +562,10 @@ static int ffv1_decode_frame(AVCodecContext *avctx, 
> void *data,
>      p->pict_type = AV_PICTURE_TYPE_I; // FIXME: I vs. P
>      if (get_rac(c, &keystate)) {
>          p->key_frame = 1;
> -        if (read_header(f) < 0)
> -            return -1;
> -        if (ffv1_init_slice_state(f) < 0)
> -            return -1;
> +        if ((ret = read_header(f)) < 0)
> +            return ret;
> +        if ((ret =ffv1_init_slice_state(f)) < 0)

diego-ahem

> +            return ret;
>  
>          ffv1_clear_state(f);
>      } else {
[...]

in general LGTM
_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to