|
|
@ -791,7 +791,7 @@ static int mkv_write_video_color(AVIOContext *pb, AVCodecParameters *par, AVStre |
|
|
|
return 0; |
|
|
|
return 0; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static void mkv_write_field_order(AVIOContext *pb, |
|
|
|
static void mkv_write_field_order(AVIOContext *pb, int mode, |
|
|
|
enum AVFieldOrder field_order) |
|
|
|
enum AVFieldOrder field_order) |
|
|
|
{ |
|
|
|
{ |
|
|
|
switch (field_order) { |
|
|
|
switch (field_order) { |
|
|
@ -809,23 +809,25 @@ static void mkv_write_field_order(AVIOContext *pb, |
|
|
|
case AV_FIELD_BT: |
|
|
|
case AV_FIELD_BT: |
|
|
|
put_ebml_uint(pb, MATROSKA_ID_VIDEOFLAGINTERLACED, |
|
|
|
put_ebml_uint(pb, MATROSKA_ID_VIDEOFLAGINTERLACED, |
|
|
|
MATROSKA_VIDEO_INTERLACE_FLAG_INTERLACED); |
|
|
|
MATROSKA_VIDEO_INTERLACE_FLAG_INTERLACED); |
|
|
|
switch (field_order) { |
|
|
|
if (mode != MODE_WEBM) { |
|
|
|
case AV_FIELD_TT: |
|
|
|
switch (field_order) { |
|
|
|
put_ebml_uint(pb, MATROSKA_ID_VIDEOFIELDORDER, |
|
|
|
case AV_FIELD_TT: |
|
|
|
MATROSKA_VIDEO_FIELDORDER_TT); |
|
|
|
put_ebml_uint(pb, MATROSKA_ID_VIDEOFIELDORDER, |
|
|
|
break; |
|
|
|
MATROSKA_VIDEO_FIELDORDER_TT); |
|
|
|
case AV_FIELD_BB: |
|
|
|
break; |
|
|
|
put_ebml_uint(pb, MATROSKA_ID_VIDEOFIELDORDER, |
|
|
|
case AV_FIELD_BB: |
|
|
|
MATROSKA_VIDEO_FIELDORDER_BB); |
|
|
|
put_ebml_uint(pb, MATROSKA_ID_VIDEOFIELDORDER, |
|
|
|
break; |
|
|
|
MATROSKA_VIDEO_FIELDORDER_BB); |
|
|
|
case AV_FIELD_TB: |
|
|
|
break; |
|
|
|
put_ebml_uint(pb, MATROSKA_ID_VIDEOFIELDORDER, |
|
|
|
case AV_FIELD_TB: |
|
|
|
MATROSKA_VIDEO_FIELDORDER_TB); |
|
|
|
put_ebml_uint(pb, MATROSKA_ID_VIDEOFIELDORDER, |
|
|
|
break; |
|
|
|
MATROSKA_VIDEO_FIELDORDER_TB); |
|
|
|
case AV_FIELD_BT: |
|
|
|
break; |
|
|
|
put_ebml_uint(pb, MATROSKA_ID_VIDEOFIELDORDER, |
|
|
|
case AV_FIELD_BT: |
|
|
|
MATROSKA_VIDEO_FIELDORDER_BT); |
|
|
|
put_ebml_uint(pb, MATROSKA_ID_VIDEOFIELDORDER, |
|
|
|
break; |
|
|
|
MATROSKA_VIDEO_FIELDORDER_BT); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -1088,8 +1090,7 @@ static int mkv_write_track(AVFormatContext *s, MatroskaMuxContext *mkv, |
|
|
|
put_ebml_uint (pb, MATROSKA_ID_VIDEOPIXELWIDTH , par->width); |
|
|
|
put_ebml_uint (pb, MATROSKA_ID_VIDEOPIXELWIDTH , par->width); |
|
|
|
put_ebml_uint (pb, MATROSKA_ID_VIDEOPIXELHEIGHT, par->height); |
|
|
|
put_ebml_uint (pb, MATROSKA_ID_VIDEOPIXELHEIGHT, par->height); |
|
|
|
|
|
|
|
|
|
|
|
if (mkv->mode != MODE_WEBM) |
|
|
|
mkv_write_field_order(pb, mkv->mode, par->field_order); |
|
|
|
mkv_write_field_order(pb, par->field_order); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// check both side data and metadata for stereo information,
|
|
|
|
// check both side data and metadata for stereo information,
|
|
|
|
// write the result to the bitstream if any is found
|
|
|
|
// write the result to the bitstream if any is found
|
|
|
|