diff options
author | Tim Nicholson <tim.nicholson@bbc.co.uk> | 2015-03-30 11:11:17 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-03-30 15:03:41 +0200 |
commit | ac9919b9662f28816cf79c1d5c36719160009588 (patch) | |
tree | 3687d65d49f431244575a8d9b0436aee3f43cc8b /libavformat | |
parent | dadc43eee4d9036aa532665a04720238cc15e922 (diff) | |
download | ffmpeg-ac9919b9662f28816cf79c1d5c36719160009588.tar.gz |
libavformat/mxfenc.c: Add 'Presentation Y offset' metadata
Previously unset, and some software mishandles files if it is absent
Signed-off-by: Tim Nicholson <tim.nicholson@bbc.co.uk>
Reviewed-by: tomas.hardin@codemill.se
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/mxfenc.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c index ac60357b7b..7b400b3727 100644 --- a/libavformat/mxfenc.c +++ b/libavformat/mxfenc.c @@ -406,6 +406,7 @@ static const MXFLocalTagPair mxf_local_tag_batch[] = { { 0x3202, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x01,0x04,0x01,0x05,0x02,0x01,0x00,0x00,0x00}}, /* Stored Height */ { 0x3209, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x01,0x04,0x01,0x05,0x01,0x0C,0x00,0x00,0x00}}, /* Display Width */ { 0x3208, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x01,0x04,0x01,0x05,0x01,0x0B,0x00,0x00,0x00}}, /* Display Height */ + { 0x320B, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x01,0x04,0x01,0x05,0x01,0x0E,0x00,0x00,0x00}}, /* Presentation Y offset */ { 0x320E, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x01,0x04,0x01,0x01,0x01,0x01,0x00,0x00,0x00}}, /* Aspect Ratio */ { 0x3201, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x02,0x04,0x01,0x06,0x01,0x00,0x00,0x00,0x00}}, /* Picture Essence Coding */ { 0x3212, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x02,0x04,0x01,0x03,0x01,0x06,0x00,0x00,0x00}}, /* Field Dominance (Opt) */ @@ -978,7 +979,7 @@ static void mxf_write_cdci_common(AVFormatContext *s, AVStream *st, const UID ke int stored_height = (st->codec->height+15)/16*16; int display_height; int f1, f2; - unsigned desc_size = size+8+8+8+8+8+8+5+16+sc->interlaced*4+12+20; + unsigned desc_size = size+8+8+8+8+8+8+8+5+16+sc->interlaced*4+12+20; if (sc->interlaced && sc->field_dominance) desc_size += 5; @@ -1003,6 +1004,10 @@ static void mxf_write_cdci_common(AVFormatContext *s, AVStream *st, const UID ke mxf_write_local_tag(pb, 4, 0x3208); avio_wb32(pb, display_height>>sc->interlaced); + // presentation Y offset + mxf_write_local_tag(pb, 4, 0x320B); + avio_wb32(pb, (st->codec->height - display_height)>>sc->interlaced); + // component depth mxf_write_local_tag(pb, 4, 0x3301); avio_wb32(pb, sc->component_depth); |