---
 libavcodec/ffv1enc.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c
index 179453d..a340f2c 100644
--- a/libavcodec/ffv1enc.c
+++ b/libavcodec/ffv1enc.c
@@ -863,10 +863,13 @@ static void encode_slice_header(FFV1Context *f, 
FFV1Context *fs)
         put_symbol(c, state, f->plane[j].quant_table_index, 0);
         av_assert0(f->plane[j].quant_table_index == f->avctx->context_model);
     }
-    if (!f->avctx->coded_frame->interlaced_frame)
+    if (f->avctx->coded_frame->field_state == AV_FRAME_PROGRESSIVE)
         put_symbol(c, state, 3, 0);
+    else if (f->avctx->coded_frame->field_state == AV_FRAME_INTERLACED_BFF)
+        put_symbol(c, state, 2, 0);
     else
-        put_symbol(c, state, 1 + !f->avctx->coded_frame->top_field_first, 0);
+        put_symbol(c, state, 1, 0);
+
     put_symbol(c, state, f->avctx->coded_frame->sample_aspect_ratio.num, 0);
     put_symbol(c, state, f->avctx->coded_frame->sample_aspect_ratio.den, 0);
 }
-- 
1.7.9.5

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

Reply via email to