changeset 4472:3ef8f4df0a54 libavformat

store display height without vbi
author bcoudurier
date Fri, 13 Feb 2009 07:13:36 +0000
parents bac4bfb54ff7
children 9eedb6599102
files mxfenc.c
diffstat 1 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mxfenc.c	Fri Feb 13 07:11:21 2009 +0000
+++ b/mxfenc.c	Fri Feb 13 07:13:36 2009 +0000
@@ -710,6 +710,7 @@
     MXFStreamContext *sc = st->priv_data;
     ByteIOContext *pb = s->pb;
     int stored_height = (st->codec->height+15)/16*16;
+    int display_height;
     AVRational dar;
     int f1, f2;
 
@@ -724,8 +725,15 @@
     mxf_write_local_tag(pb, 4, 0x3209);
     put_be32(pb, st->codec->width);
 
+    if (st->codec->height == 608) // PAL + VBI
+        display_height = 576;
+    else if (st->codec->height == 512)  // NTSC + VBI
+        display_height = 486;
+    else
+        display_height = st->codec->height;
+
     mxf_write_local_tag(pb, 4, 0x3208);
-    put_be32(pb, st->codec->height>>sc->interlaced);
+    put_be32(pb, display_height>>sc->interlaced);
 
     // component depth
     mxf_write_local_tag(pb, 4, 0x3301);