]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/vc1_parser.c
avcodec: Add av_cold attributes to init functions missing them
[ffmpeg] / libavcodec / vc1_parser.c
index bf29032c541e5eccc76dbd4f430ec18e4f613196..1bedd986b4fae60881eca17954402349d050202a 100644 (file)
@@ -25,6 +25,7 @@
  * VC-1 and WMV3 parser
  */
 
+#include "libavutil/attributes.h"
 #include "parser.h"
 #include "vc1.h"
 #include "get_bits.h"
@@ -88,6 +89,11 @@ static void vc1_extract_headers(AVCodecParserContext *s, AVCodecContext *avctx,
                 }
             }
 
+            if (vpc->v.broadcast && vpc->v.interlace && !vpc->v.psf)
+                s->field_order = vpc->v.tff ? AV_FIELD_TT : AV_FIELD_BB;
+            else
+                s->field_order = AV_FIELD_PROGRESSIVE;
+
             break;
         }
     }
@@ -184,7 +190,7 @@ static int vc1_split(AVCodecContext *avctx,
     return 0;
 }
 
-static int vc1_parse_init(AVCodecParserContext *s)
+static av_cold int vc1_parse_init(AVCodecParserContext *s)
 {
     VC1ParseContext *vpc = s->priv_data;
     vpc->v.s.slice_context_count = 1;
@@ -192,7 +198,7 @@ static int vc1_parse_init(AVCodecParserContext *s)
 }
 
 AVCodecParser ff_vc1_parser = {
-    .codec_ids      = { CODEC_ID_VC1 },
+    .codec_ids      = { AV_CODEC_ID_VC1 },
     .priv_data_size = sizeof(VC1ParseContext),
     .parser_init    = vc1_parse_init,
     .parser_parse   = vc1_parse,