]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/mpegvideo_parser.c
libvorbis: use float input instead of s16
[ffmpeg] / libavcodec / mpegvideo_parser.c
index b4066ba720ec674a41c71cbd2393cba0303dbdab..f0b3b202eb831fd19eeb09ecd3d222c4825a1d4b 100644 (file)
 #include "parser.h"
 #include "mpegvideo.h"
 
+struct MpvParseContext {
+    ParseContext pc;
+    AVRational frame_rate;
+    int progressive_sequence;
+    int width, height;
+};
+
+
 static void mpegvideo_extract_headers(AVCodecParserContext *s,
                                       AVCodecContext *avctx,
                                       const uint8_t *buf, int buf_size)
 {
-    ParseContext1 *pc = s->priv_data;
+    struct MpvParseContext *pc = s->priv_data;
     const uint8_t *buf_end = buf + buf_size;
     uint32_t start_code;
     int frame_rate_index, ext_type, bytes_left;
@@ -131,7 +139,7 @@ static int mpegvideo_parse(AVCodecParserContext *s,
                            const uint8_t **poutbuf, int *poutbuf_size,
                            const uint8_t *buf, int buf_size)
 {
-    ParseContext1 *pc1 = s->priv_data;
+    struct MpvParseContext *pc1 = s->priv_data;
     ParseContext *pc= &pc1->pc;
     int next;
 
@@ -174,10 +182,9 @@ static int mpegvideo_split(AVCodecContext *avctx,
 }
 
 AVCodecParser ff_mpegvideo_parser = {
-    { CODEC_ID_MPEG1VIDEO, CODEC_ID_MPEG2VIDEO },
-    sizeof(ParseContext1),
-    NULL,
-    mpegvideo_parse,
-    ff_parse1_close,
-    mpegvideo_split,
+    .codec_ids      = { CODEC_ID_MPEG1VIDEO, CODEC_ID_MPEG2VIDEO },
+    .priv_data_size = sizeof(struct MpvParseContext),
+    .parser_parse   = mpegvideo_parse,
+    .parser_close   = ff_parse_close,
+    .split          = mpegvideo_split,
 };