summaryrefslogtreecommitdiff
path: root/libavcodec/vc1dec.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2013-11-30 18:36:00 +0100
committerAnton Khirnov <anton@khirnov.net>2013-12-05 13:27:24 +0100
commitac1fc92ea410c396594fcd79f5d4491fe6a8cc90 (patch)
treeea806b284640b329b4d04e12838d2234d8e2b589 /libavcodec/vc1dec.c
parent282c6a1a0ef3e8c8e180c15b39cfe5b89704d848 (diff)
vc1dec: move setting repeat_pict after frame_start() has been called.
This will allow removing the hacks where each decoder sets current_picture_ptr on its own.
Diffstat (limited to 'libavcodec/vc1dec.c')
-rw-r--r--libavcodec/vc1dec.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index 4a73d2c193..ab4e098fac 100644
--- a/libavcodec/vc1dec.c
+++ b/libavcodec/vc1dec.c
@@ -5943,18 +5943,6 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data,
goto err;
}
- // process pulldown flags
- s->current_picture_ptr->f.repeat_pict = 0;
- // Pulldown flags are only valid when 'broadcast' has been set.
- // So ticks_per_frame will be 2
- if (v->rff) {
- // repeat field
- s->current_picture_ptr->f.repeat_pict = 1;
- } else if (v->rptfrm) {
- // repeat frames
- s->current_picture_ptr->f.repeat_pict = v->rptfrm * 2;
- }
-
// for skipping the frame
s->current_picture.f.pict_type = s->pict_type;
s->current_picture.f.key_frame = s->pict_type == AV_PICTURE_TYPE_I;
@@ -5980,6 +5968,18 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data,
goto err;
}
+ // process pulldown flags
+ s->current_picture_ptr->f.repeat_pict = 0;
+ // Pulldown flags are only valid when 'broadcast' has been set.
+ // So ticks_per_frame will be 2
+ if (v->rff) {
+ // repeat field
+ s->current_picture_ptr->f.repeat_pict = 1;
+ } else if (v->rptfrm) {
+ // repeat frames
+ s->current_picture_ptr->f.repeat_pict = v->rptfrm * 2;
+ }
+
s->me.qpel_put = s->dsp.put_qpel_pixels_tab;
s->me.qpel_avg = s->dsp.avg_qpel_pixels_tab;