 libavcodec/h264.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index b797893..0f9f6c5 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -806,11 +806,11 @@ static void decode_postinit(H264Context *h, int setup_finished)
         if (cur->f->interlaced_frame || h->sps.pic_struct_present_flag) {
             /* Use picture timing SEI information. Even if it is a
              * information of a past frame, better than nothing. */
-            if (h->sei_pic_struct == SEI_PIC_STRUCT_TOP_BOTTOM ||
-                h->sei_pic_struct == SEI_PIC_STRUCT_TOP_BOTTOM_TOP)
-                cur->f->top_field_first = 1;
-            else
+            if (h->sei_pic_struct == SEI_PIC_STRUCT_BOTTOM_TOP ||
+                h->sei_pic_struct == SEI_PIC_STRUCT_BOTTOM_TOP_BOTTOM)
                 cur->f->top_field_first = 0;
+            else
+                cur->f->top_field_first = 1;
         } else {
             /* Most likely progressive */
             cur->f->top_field_first = 0;
