return AVERROR(EINVAL);
}
- if (desc->flags & (AV_PIX_FMT_FLAG_PAL | FF_PSEUDOPAL)) {
+ if (desc->flags & AV_PIX_FMT_FLAG_PAL) {
context->palette = av_buffer_alloc(AVPALETTE_SIZE);
if (!context->palette)
return AVERROR(ENOMEM);
-#if FF_API_PSEUDOPAL
- if (desc->flags & AV_PIX_FMT_FLAG_PSEUDOPAL)
- avpriv_set_systematic_pal2((uint32_t*)context->palette->data, avctx->pix_fmt);
-#endif
- else {
- memset(context->palette->data, 0, AVPALETTE_SIZE);
- if (avctx->bits_per_coded_sample == 1)
- memset(context->palette->data, 0xff, 4);
- }
+ memset(context->palette->data, 0, AVPALETTE_SIZE);
+ if (avctx->bits_per_coded_sample == 1)
+ memset(context->palette->data, 0xff, 4);
}
if ((avctx->extradata_size >= 9 &&
frame->linesize[1] = FFALIGN(frame->linesize[1], linesize_align);
}
- if ((avctx->pix_fmt == AV_PIX_FMT_PAL8 && buf_size < context->frame_size) ||
- (desc->flags & FF_PSEUDOPAL)) {
+ if (avctx->pix_fmt == AV_PIX_FMT_PAL8 && buf_size < context->frame_size) {
frame->buf[1] = av_buffer_ref(context->palette);
if (!frame->buf[1]) {
av_buffer_unref(&frame->buf[0]);
RawVideoContext *context = avctx->priv_data;
av_buffer_unref(&context->palette);
+ av_freep(&context->bitstream_buf);
return 0;
}
-AVCodec ff_rawvideo_decoder = {
+const AVCodec ff_rawvideo_decoder = {
.name = "rawvideo",
.long_name = NULL_IF_CONFIG_SMALL("raw video"),
.type = AVMEDIA_TYPE_VIDEO,