Merge commit 'a1a143adb0fd11c474221431417cff25db7d920f'
[ffmpeg.git] / libavcodec / vp3_parser.c
index c22e6dd..7ee046c 100644 (file)
 #include "parser.h"
 
 static int parse(AVCodecParserContext *s,
-                           AVCodecContext *avctx,
-                           const uint8_t **poutbuf, int *poutbuf_size,
-                           const uint8_t *buf, int buf_size)
+                 AVCodecContext *avctx,
+                 const uint8_t **poutbuf, int *poutbuf_size,
+                 const uint8_t *buf, int buf_size)
 {
-    if(avctx->codec_id == CODEC_ID_THEORA)
-        s->pict_type= (buf[0]&0x40) ? FF_P_TYPE : FF_I_TYPE;
+    if (avctx->codec_id == AV_CODEC_ID_THEORA)
+        s->pict_type = (buf[0] & 0x40) ? AV_PICTURE_TYPE_P : AV_PICTURE_TYPE_I;
     else
-        s->pict_type= (buf[0]&0x80) ? FF_P_TYPE : FF_I_TYPE;
+        s->pict_type = (buf[0] & 0x80) ? AV_PICTURE_TYPE_P : AV_PICTURE_TYPE_I;
 
-    *poutbuf = buf;
+    *poutbuf      = buf;
     *poutbuf_size = buf_size;
     return buf_size;
 }
 
-AVCodecParser vp3_parser = {
-    { CODEC_ID_THEORA, CODEC_ID_VP3,
-      CODEC_ID_VP6,    CODEC_ID_VP6F, CODEC_ID_VP6A },
-    0,
-    NULL,
-    parse,
+AVCodecParser ff_vp3_parser = {
+    .codec_ids    = {
+        AV_CODEC_ID_THEORA, AV_CODEC_ID_VP3,
+        AV_CODEC_ID_VP6, AV_CODEC_ID_VP6F, AV_CODEC_ID_VP6A
+    },
+    .parser_parse = parse,
 };