summaryrefslogtreecommitdiffstats
path: root/libmpeg2
diff options
context:
space:
mode:
Diffstat (limited to 'libmpeg2')
-rw-r--r--libmpeg2/header.c3
-rw-r--r--libmpeg2/mpeg2.h1
2 files changed, 3 insertions, 1 deletions
diff --git a/libmpeg2/header.c b/libmpeg2/header.c
index 38b833fa8a..e8a39939e6 100644
--- a/libmpeg2/header.c
+++ b/libmpeg2/header.c
@@ -506,7 +506,8 @@ static int picture_coding_ext (mpeg2dec_t * mpeg2dec)
case FRAME_PICTURE:
if (!(mpeg2dec->sequence.flags & SEQ_FLAG_PROGRESSIVE_SEQUENCE)) {
picture->nb_fields = (buffer[3] & 2) ? 3 : 2;
- flags |= (buffer[3] & 128) ? PIC_FLAG_TOP_FIELD_FIRST : 0;
+ flags |= (buffer[3] & 128) ? PIC_FLAG_TOP_FIELD_FIRST : 0;
+ flags |= (buffer[3] & 2) ? PIC_FLAG_REPEAT_FIRST_FIELD : 0;
} else
picture->nb_fields = (buffer[3]&2) ? ((buffer[3]&128) ? 6 : 4) : 2;
break;
diff --git a/libmpeg2/mpeg2.h b/libmpeg2/mpeg2.h
index 5016f4d85f..09ad795533 100644
--- a/libmpeg2/mpeg2.h
+++ b/libmpeg2/mpeg2.h
@@ -67,6 +67,7 @@ typedef struct {
#define PIC_FLAG_COMPOSITE_DISPLAY 32
#define PIC_FLAG_SKIP 64
#define PIC_FLAG_PTS 128
+#define PIC_FLAG_REPEAT_FIRST_FIELD 256
#define PIC_MASK_COMPOSITE_DISPLAY 0xfffff000
typedef struct {