X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fpnm.c;h=1c380b0ff864706bd6545a7b9d1b33d5e0e00365;hb=0652e024c680420d298cdf3719d0a0c030173fe3;hp=094e03d8fac33798593f7ec621e7476aa98564ba;hpb=b5f536d24b5ae360503935c34d5d59fa5181b94d;p=ffmpeg diff --git a/libavcodec/pnm.c b/libavcodec/pnm.c index 094e03d8fac..1c380b0ff86 100644 --- a/libavcodec/pnm.c +++ b/libavcodec/pnm.c @@ -173,7 +173,7 @@ int ff_pnm_decode_header(AVCodecContext *avctx, PNMContext * const s) }else s->maxval=1; /* more check if YUV420 */ - if (av_pix_fmt_descriptors[avctx->pix_fmt].flags & PIX_FMT_PLANAR) { + if (av_pix_fmt_desc_get(avctx->pix_fmt)->flags & AV_PIX_FMT_FLAG_PLANAR) { if ((avctx->width & 1) != 0) return AVERROR_INVALIDDATA; h = (avctx->height * 2); @@ -184,23 +184,3 @@ int ff_pnm_decode_header(AVCodecContext *avctx, PNMContext * const s) } return 0; } - -av_cold int ff_pnm_end(AVCodecContext *avctx) -{ - PNMContext *s = avctx->priv_data; - - if (s->picture.data[0]) - avctx->release_buffer(avctx, &s->picture); - - return 0; -} - -av_cold int ff_pnm_init(AVCodecContext *avctx) -{ - PNMContext *s = avctx->priv_data; - - avcodec_get_frame_defaults(&s->picture); - avctx->coded_frame = &s->picture; - - return 0; -}