summaryrefslogtreecommitdiff
path: root/libavformat/mxfenc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2018-03-17 23:04:50 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2018-05-08 23:02:58 +0200
commit77cbe698cd9124dc23c5c235ad52e5ce3973633a (patch)
tree2de8803d9c933f869464a3abb02672831f510670 /libavformat/mxfenc.c
parent1b6c89ca8db2608499949e51f0a38c7ec0a5e921 (diff)
avformat/mxfenc: Fix stored width
This fixes the width to have computations matching the height Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/mxfenc.c')
-rw-r--r--libavformat/mxfenc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c
index d5aa11293b..56ba8eebf3 100644
--- a/libavformat/mxfenc.c
+++ b/libavformat/mxfenc.c
@@ -1131,6 +1131,7 @@ static void mxf_write_cdci_common(AVFormatContext *s, AVStream *st, const UID ke
{
MXFStreamContext *sc = st->priv_data;
AVIOContext *pb = s->pb;
+ int stored_width = (st->codecpar->width +15)/16*16;
int stored_height = (st->codecpar->height+15)/16*16;
int display_height;
int f1, f2;
@@ -1143,7 +1144,7 @@ static void mxf_write_cdci_common(AVFormatContext *s, AVStream *st, const UID ke
mxf_write_generic_desc(s, st, key, desc_size);
mxf_write_local_tag(pb, 4, 0x3203);
- avio_wb32(pb, st->codecpar->width);
+ avio_wb32(pb, stored_width);
mxf_write_local_tag(pb, 4, 0x3202);
avio_wb32(pb, stored_height>>sc->interlaced);