---
 libavcodec/proresenc.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavcodec/proresenc.c b/libavcodec/proresenc.c
index 7e9ce54..b8e294d 100644
--- a/libavcodec/proresenc.c
+++ b/libavcodec/proresenc.c
@@ -516,7 +516,7 @@ static int encode_slice(AVCodecContext *avctx, const 
AVFrame *pic,
     if (ctx->pictures_per_frame == 1)
         line_add = 0;
     else
-        line_add = ctx->cur_picture_idx ^ !pic->top_field_first;
+        line_add = ctx->cur_picture_idx ^ (pic->field_state == 
AV_FRAME_INTERLACED_BFF);
 
     if (ctx->force_quant) {
         qmat = ctx->quants[0];
@@ -760,7 +760,7 @@ static int find_slice_quant(AVCodecContext *avctx, const 
AVFrame *pic,
     if (ctx->pictures_per_frame == 1)
         line_add = 0;
     else
-        line_add = ctx->cur_picture_idx ^ !pic->top_field_first;
+        line_add = ctx->cur_picture_idx ^ pic->field_state == 
AV_FRAME_INTERLACED_BFF;
     mbs = x + mbs_per_slice;
 
     for (i = 0; i < ctx->num_planes; i++) {
@@ -961,7 +961,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket 
*pkt,
 
     frame_flags = ctx->chroma_factor << 6;
     if (avctx->flags & CODEC_FLAG_INTERLACED_DCT)
-        frame_flags |= pic->top_field_first ? 0x04 : 0x08;
+        frame_flags |= pic->field_state == AV_FRAME_INTERLACED_TFF ? 0x04 : 
0x08;
     bytestream_put_byte  (&buf, frame_flags);
 
     bytestream_put_byte  (&buf, 0);             // reserved
-- 
1.7.9.5

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to