X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fyop.c;h=255ed32ca783482bfde254b1a51529d7f4614a24;hb=7fd9d49ba7fa57629592b1f7064cb12d96984a14;hp=3e27c1fe2775cfe178b85df01d9a848b1929f3e8;hpb=a33ed6bc74b6b8ada925c76c4084afcf8870a048;p=ffmpeg diff --git a/libavcodec/yop.c b/libavcodec/yop.c index 3e27c1fe277..255ed32ca78 100644 --- a/libavcodec/yop.c +++ b/libavcodec/yop.c @@ -85,7 +85,6 @@ 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"); return -1; } @@ -104,7 +103,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"); return AVERROR_INVALIDDATA; } @@ -147,8 +146,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"); return AVERROR_INVALIDDATA; } @@ -235,7 +233,7 @@ static int yop_decode_frame(AVCodecContext *avctx, void *data, int *data_size, palette[i + firstcolor] = (s->srcptr[0] << 18) | (s->srcptr[1] << 10) | (s->srcptr[2] << 2); - palette[i + firstcolor] |= 0xFF << 24 | + palette[i + firstcolor] |= 0xFFU << 24 | (palette[i + firstcolor] >> 6) & 0x30303; }