diff mpeg12.c @ 1682:7b810155650f libavcodec

fixed top_field_first support when encoding
author bellard
date Fri, 12 Dec 2003 16:56:38 +0000
parents c8b1b515d3b9
children db54bb946ab3
line wrap: on
line diff
--- a/mpeg12.c	Fri Dec 12 16:55:12 2003 +0000
+++ b/mpeg12.c	Fri Dec 12 16:56:38 2003 +0000
@@ -448,7 +448,11 @@
         }
         put_bits(&s->pb, 2, s->intra_dc_precision);
         put_bits(&s->pb, 2, s->picture_structure= PICT_FRAME);
-        put_bits(&s->pb, 1, s->top_field_first);
+        if (s->progressive_sequence) {
+            put_bits(&s->pb, 1, 0); /* no repeat */
+        } else {
+            put_bits(&s->pb, 1, s->current_picture_ptr->top_field_first);
+        }
         /* XXX: optimize the generation of this flag with entropy
            measures */
         s->frame_pred_frame_dct = s->progressive_sequence;