summaryrefslogtreecommitdiff
path: root/libavcodec/vc1_parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/vc1_parser.c')
-rw-r--r--libavcodec/vc1_parser.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/libavcodec/vc1_parser.c b/libavcodec/vc1_parser.c
index 27ff1bdaa3..c4c15b326d 100644
--- a/libavcodec/vc1_parser.c
+++ b/libavcodec/vc1_parser.c
@@ -45,6 +45,7 @@ static void vc1_extract_headers(AVCodecParserContext *s, AVCodecContext *avctx,
vpc->v.s.avctx = avctx;
vpc->v.parse_only = 1;
next = buf;
+ s->repeat_pict = 0;
for(start = buf, end = buf + buf_size; next < end; start = next){
int buf2_size, size;
@@ -73,6 +74,20 @@ static void vc1_extract_headers(AVCodecParserContext *s, AVCodecContext *avctx,
else
s->pict_type = vpc->v.s.pict_type;
+ if (avctx->ticks_per_frame > 1){
+ // process pulldown flags
+ s->repeat_pict = 1;
+ // Pulldown flags are only valid when 'broadcast' has been set.
+ // So ticks_per_frame will be 2
+ if (vpc->v.rff){
+ // repeat field
+ s->repeat_pict = 2;
+ }else if (vpc->v.rptfrm){
+ // repeat frames
+ s->repeat_pict = vpc->v.rptfrm * 2 + 1;
+ }
+ }
+
break;
}
}