summaryrefslogtreecommitdiff
path: root/libavcodec/rawdec.c
diff options
context:
space:
mode:
authorNicolas George <nicolas.george@normalesup.org>2013-03-09 20:21:10 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-03-10 01:41:49 +0100
commit9cc02101ff6de45d48425fa23978643e1b760626 (patch)
treebdef3a8bc9b48890f3527fe9ad327224842a50e2 /libavcodec/rawdec.c
parent6184fa2067ccf88e68a7009442cf01440e59d99c (diff)
lavc/rawdec: set field order on decoded frame.
Diffstat (limited to 'libavcodec/rawdec.c')
-rw-r--r--libavcodec/rawdec.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libavcodec/rawdec.c b/libavcodec/rawdec.c
index 01ecf785a0..efd802066c 100644
--- a/libavcodec/rawdec.c
+++ b/libavcodec/rawdec.c
@@ -147,12 +147,6 @@ static av_cold int raw_init_decoder(AVCodecContext *avctx)
avctx->codec_tag == MKTAG('W','R','A','W'))
context->flip = 1;
- if (avctx->field_order > AV_FIELD_PROGRESSIVE) { /*we have interlaced material flagged in container */
- avctx->coded_frame->interlaced_frame = 1;
- if (avctx->field_order == AV_FIELD_TT || avctx->field_order == AV_FIELD_TB)
- avctx->coded_frame->top_field_first = 1;
- }
-
if (avctx->codec_tag == AV_RL32("yuv2") &&
avctx->pix_fmt == AV_PIX_FMT_YUYV422)
context->is_yuv2 = 1;
@@ -325,6 +319,12 @@ static int raw_decode(AVCodecContext *avctx, void *data, int *got_frame,
}
}
+ if (avctx->field_order > AV_FIELD_PROGRESSIVE) { /* we have interlaced material flagged in container */
+ frame->interlaced_frame = 1;
+ if (avctx->field_order == AV_FIELD_TT || avctx->field_order == AV_FIELD_TB)
+ frame->top_field_first = 1;
+ }
+
*got_frame = 1;
return buf_size;
}