]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/mmvideo.c
mjpegdec: support more pix_fmt_ids for grayscale
[ffmpeg] / libavcodec / mmvideo.c
index b51d4fed6a2e29a8231eb4db7d2d293f81075caf..c61cd576e499b70082d9e4c3b6e0b6adc32c0947 100644 (file)
@@ -120,7 +120,7 @@ static int mm_decode_intra(MmContext * s, int half_horiz, int half_vert)
     return 0;
 }
 
-/*
+/**
  * @param half_horiz Half horizontal resolution (0 or 1)
  * @param half_vert Half vertical resolution (0 or 1)
  */
@@ -173,7 +173,7 @@ static int mm_decode_inter(MmContext * s, int half_horiz, int half_vert)
 }
 
 static int mm_decode_frame(AVCodecContext *avctx,
-                            void *data, int *data_size,
+                            void *data, int *got_frame,
                             AVPacket *avpkt)
 {
     const uint8_t *buf = avpkt->data;
@@ -210,7 +210,7 @@ static int mm_decode_frame(AVCodecContext *avctx,
 
     memcpy(s->frame.data[1], s->palette, AVPALETTE_SIZE);
 
-    *data_size = sizeof(AVFrame);
+    *got_frame      = 1;
     *(AVFrame*)data = s->frame;
 
     return avpkt->size;