[FFmpeg-devel] [PATCH 4/6] lavc/yop: remove redudant YOP in av_log() messages

Stefano Sabatini stefasab at gmail.com
Wed Oct 17 22:20:26 CEST 2012


On date Wednesday 2012-10-17 15:55:17 +0000, Paul B Mahol encoded:
> Signed-off-by: Paul B Mahol <onemda at gmail.com>
> ---
>  libavcodec/yop.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/libavcodec/yop.c b/libavcodec/yop.c
> index 2103628..48e7dbc 100644
> --- a/libavcodec/yop.c
> +++ b/libavcodec/yop.c
> @@ -85,7 +85,7 @@ static av_cold int yop_decode_init(AVCodecContext *avctx)
>  
>      if (avctx->width & 1 || avctx->height & 1 ||
>          av_image_check_size(avctx->width, avctx->height, 0, avctx) < 0) {
> -        av_log(avctx, AV_LOG_ERROR, "YOP has invalid dimensions\n");
> +        av_log(avctx, AV_LOG_ERROR, "invalid dimensions\n");
>          return -1;

Nit: while at it: "Invalid dimension"

or just drop the log since av_image_check_size() already logs it

>      }
>  
> @@ -104,7 +104,7 @@ static av_cold int yop_decode_init(AVCodecContext *avctx)
>      if (s->num_pal_colors + s->first_color[0] > 256 ||
>          s->num_pal_colors + s->first_color[1] > 256) {
>          av_log(avctx, AV_LOG_ERROR,
> -               "YOP: palette parameters invalid, header probably corrupt\n");
> +               "palette parameters invalid, header probably corrupt\n");

Nit: "Palette ..."

>          return AVERROR_INVALIDDATA;
>      }
>  
> @@ -147,8 +147,7 @@ static int yop_copy_previous_block(YopDecContext *s, int copy_tag)
>      bufptr = s->dstptr + motion_vector[copy_tag][0] +
>               s->frame.linesize[0] * motion_vector[copy_tag][1];
>      if (bufptr < s->dstbuf) {
> -        av_log(s->avctx, AV_LOG_ERROR,
> -               "YOP: cannot decode, file probably corrupt\n");
> +        av_log(s->avctx, AV_LOG_ERROR, "file probably corrupt\n");

Nit: "File ..."

>          return AVERROR_INVALIDDATA;
>      }

LGTM.
-- 
FFmpeg = Faithless and Friendly Mythic Problematic Elitist Geek


More information about the ffmpeg-devel mailing list