On Tue, Jul 30, 2013 at 12:10 PM, Hendrik Leppkes <[email protected]>wrote:

> On Tue, Jul 30, 2013 at 12:00 PM, Vittorio Giovara
> <[email protected]> wrote:
> > ---
> > Resend taking into account Luca and Diego's comments.
> >
> >  libavcodec/h264.c |  198
> ++++++++++++++++++++++++++++++-----------------------
> >  1 file changed, 113 insertions(+), 85 deletions(-)
> >
> > diff --git a/libavcodec/h264.c b/libavcodec/h264.c
> > index 2dccb87..effd6d9 100644
> > --- a/libavcodec/h264.c
> > +++ b/libavcodec/h264.c
> > @@ -415,7 +415,7 @@ int ff_h264_check_intra4x4_pred_mode(H264Context *h)
> >                  av_log(h->avctx, AV_LOG_ERROR,
> >                         "top block unavailable for requested intra4x4
> mode %d at %d %d\n",
> >                         status, h->mb_x, h->mb_y);
> > -                return -1;
> > +                return status;
>
> Status is not an AVERROR code, it'll just be -1, so
> AVERROR_INVALIDDATA seems more appropriate?
>

Ok I'll also take care of the case below.


>
> >              } else if (status) {
> >                  h->intra4x4_pred_mode_cache[scan8[0] + i] = status;
> >              }
> > @@ -431,7 +431,7 @@ int ff_h264_check_intra4x4_pred_mode(H264Context *h)
> >                      av_log(h->avctx, AV_LOG_ERROR,
> >                             "left block unavailable for requested
> intra4x4 mode %d at %d %d\n",
> >                             status, h->mb_x, h->mb_y);
> > -                    return -1;
> > +                    return status;
>

> @@ -2786,7 +2798,8 @@ static int field_end(H264Context *h, int in_setup)
> >      }
> >
> >      if (avctx->hwaccel) {
> > -        if (avctx->hwaccel->end_frame(avctx) < 0)
> > +        err = avctx->hwaccel->end_frame(avctx);
> > +        if (err < 0)
> >              av_log(avctx, AV_LOG_ERROR,
> >                     "hardware accelerator failed to decode picture\n");
>
> This change seems unnecessary, as the return value is not used for
> anything.
> In addition, you can skip the additional "ret" variable and keep using
> "err" when err is not being clobbered here.
>
> Ok I'll revert this change.


>
> > @@ -4062,7 +4082,8 @@ static void loop_filter(H264Context *h, int
> start_x, int end_x)
> >                  }
> >                  backup_mb_border(h, dest_y, dest_cb, dest_cr, linesize,
> >                                   uvlinesize, 0);
> > -                if (fill_filter_caches(h, mb_type))
> > +                ret = fill_filter_caches(h, mb_type);
> > +                if (ret)
> >                      continue;
>
> Since the value is also not used for anything, is this really the better
> way?
>
> Yeah, I'll revert this one too

Vittorio
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to