summaryrefslogtreecommitdiff
path: root/libavcodec/dvdec.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/dvdec.c')
-rw-r--r--libavcodec/dvdec.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libavcodec/dvdec.c b/libavcodec/dvdec.c
index afc4bb0bcd..2b4d70ac3d 100644
--- a/libavcodec/dvdec.c
+++ b/libavcodec/dvdec.c
@@ -670,14 +670,14 @@ static int dvvideo_decode_frame(AVCodecContext *avctx, AVFrame *frame,
/* Determine the codec's field order from the packet */
if ( *vsc_pack == DV_VIDEO_CONTROL ) {
if (avctx->height == 720) {
- frame->interlaced_frame = 0;
- frame->top_field_first = 0;
+ frame->flags &= ~AV_FRAME_FLAG_INTERLACED;
+ frame->flags &= ~AV_FRAME_FLAG_TOP_FIELD_FIRST;
} else if (avctx->height == 1080) {
- frame->interlaced_frame = 1;
- frame->top_field_first = (vsc_pack[3] & 0x40) == 0x40;
+ frame->flags |= AV_FRAME_FLAG_INTERLACED;
+ frame->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST * ((vsc_pack[3] & 0x40) == 0x40);
} else {
- frame->interlaced_frame = (vsc_pack[3] & 0x10) == 0x10;
- frame->top_field_first = !(vsc_pack[3] & 0x40);
+ frame->flags |= AV_FRAME_FLAG_INTERLACED * ((vsc_pack[3] & 0x10) == 0x10);
+ frame->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST * !(vsc_pack[3] & 0x40);
}
}