]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/pnm.c
cllc: Convert to the new bitstream reader
[ffmpeg] / libavcodec / pnm.c
index 9d7c68dc647244baba2b95a806653b87acd7a90c..1c380b0ff864706bd6545a7b9d1b33d5e0e00365 100644 (file)
@@ -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_desc_get(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,13 +184,3 @@ int ff_pnm_decode_header(AVCodecContext *avctx, PNMContext * const s)
     }
     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;
-}