X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=libavcodec%2Fbrenderpix.c;h=70a3e6be2a3068193c86b6dbd66a47d4b4f6c984;hb=2b01b7918beebe7b392ebf255f887e396a59e4c6;hp=9807a11cf98f13b6dcf8523428acf4fc27207332;hpb=55e5af3c03898ffbac352fe4af83208fa4129c71;p=platform%2Fupstream%2Fffmpeg.git diff --git a/libavcodec/brenderpix.c b/libavcodec/brenderpix.c index 9807a11..70a3e6b 100644 --- a/libavcodec/brenderpix.c +++ b/libavcodec/brenderpix.c @@ -26,7 +26,7 @@ #include "avcodec.h" #include "bytestream.h" #include "codec_internal.h" -#include "internal.h" +#include "decode.h" #define HEADER1_CHUNK 0x03 #define HEADER2_CHUNK 0x3D @@ -245,7 +245,11 @@ static int pix_decode_frame(AVCodecContext *avctx, AVFrame *frame, *pal_out++ = (0xFFU << 24) | bytestream2_get_be32u(&gb); bytestream2_skip(&gb, 8); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif chunk_type = bytestream2_get_be32(&gb); } else if (avctx->pix_fmt == AV_PIX_FMT_PAL8) { @@ -257,7 +261,11 @@ static int pix_decode_frame(AVCodecContext *avctx, AVFrame *frame, "Using default palette, colors might be off.\n"); memcpy(pal_out, std_pal_table, sizeof(uint32_t) * 256); +#if FF_API_PALETTE_HAS_CHANGED +FF_DISABLE_DEPRECATION_WARNINGS frame->palette_has_changed = 1; +FF_ENABLE_DEPRECATION_WARNINGS +#endif } data_len = bytestream2_get_be32(&gb); @@ -278,7 +286,7 @@ static int pix_decode_frame(AVCodecContext *avctx, AVFrame *frame, bytes_per_scanline, hdr.height); frame->pict_type = AV_PICTURE_TYPE_I; - frame->key_frame = 1; + frame->flags |= AV_FRAME_FLAG_KEY; *got_frame = 1; return avpkt->size; @@ -286,7 +294,7 @@ static int pix_decode_frame(AVCodecContext *avctx, AVFrame *frame, const FFCodec ff_brender_pix_decoder = { .p.name = "brender_pix", - .p.long_name = NULL_IF_CONFIG_SMALL("BRender PIX image"), + CODEC_LONG_NAME("BRender PIX image"), .p.type = AVMEDIA_TYPE_VIDEO, .p.id = AV_CODEC_ID_BRENDER_PIX, .p.capabilities = AV_CODEC_CAP_DR1,