]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/mmvideo.c
Fix dependency: generated table is needed to create the mpegaudiodec.o file, not...
[ffmpeg] / libavcodec / mmvideo.c
index 03d86ee9dc5f026e75c503304a4f623fb17cbf9b..596ca7aec47b0fb8067384f5bc992c4c7a2e2836 100644 (file)
@@ -20,7 +20,7 @@
  */
 
 /**
- * @file mm.c
+ * @file libavcodec/mmvideo.c
  * American Laser Games MM Video Decoder
  * by Peter Ross (suxen_drol at hotmail dot com)
  *
@@ -31,6 +31,7 @@
  *  http://wiki.multimedia.cx/index.php?title=American_Laser_Games_MM
  */
 
+#include "libavutil/intreadwrite.h"
 #include "avcodec.h"
 
 #define MM_PREAMBLE_SIZE    6
@@ -57,9 +58,6 @@ static av_cold int mm_decode_init(AVCodecContext *avctx)
 
     avctx->pix_fmt = PIX_FMT_PAL8;
 
-    if (avcodec_check_dimensions(avctx, avctx->width, avctx->height))
-        return -1;
-
     s->frame.reference = 1;
     if (avctx->get_buffer(avctx, &s->frame)) {
         av_log(s->avctx, AV_LOG_ERROR, "mmvideo: get_buffer() failed\n");
@@ -158,8 +156,10 @@ static void mm_decode_inter(MmContext * s, int half_horiz, int half_vert, const
 
 static int mm_decode_frame(AVCodecContext *avctx,
                             void *data, int *data_size,
-                            const uint8_t *buf, int buf_size)
+                            AVPacket *avpkt)
 {
+    const uint8_t *buf = avpkt->data;
+    int buf_size = avpkt->size;
     MmContext *s = avctx->priv_data;
     const uint8_t *buf_end = buf+buf_size;
     int type;