{
MXFStreamContext *sc = st->priv_data;
AVIOContext *pb = s->pb;
- int stored_width = (st->codecpar->width +15)/16*16;
+ int stored_width = 0;
int stored_height = (st->codecpar->height+15)/16*16;
int display_height;
int f1, f2;
get_trc(transfer_ul, st->codecpar->color_trc);
+ if (st->codecpar->codec_id == AV_CODEC_ID_DVVIDEO) {
+ if (st->codecpar->height == 1080)
+ stored_width = 1920;
+ else if (st->codecpar->height == 720)
+ stored_width = 1280;
+ }
+ if (!stored_width)
+ stored_width = (st->codecpar->width+15)/16*16;
+
mxf_write_local_tag(pb, 4, 0x3203);
avio_wb32(pb, stored_width);
//Sampled width
mxf_write_local_tag(pb, 4, 0x3205);
- avio_wb32(pb, st->codecpar->width);
+ avio_wb32(pb, stored_width);
//Samples height
mxf_write_local_tag(pb, 4, 0x3204);
avio_wb32(pb, 0);
mxf_write_local_tag(pb, 4, 0x3209);
- avio_wb32(pb, st->codecpar->width);
+ avio_wb32(pb, stored_width);
if (st->codecpar->height == 608) // PAL + VBI
display_height = 576;