mirror of https://git.ffmpeg.org/ffmpeg.git
avformat/matroskaenc: write DisplayWidth and DisplayHeight elements only if they differ from PixelWidth and PixelHeight
Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
178eebd79e
commit
cc71fa319f
|
@ -1192,8 +1192,10 @@ static int mkv_write_track(AVFormatContext *s, MatroskaMuxContext *mkv,
|
||||||
av_log(s, AV_LOG_ERROR, "Overflow in display width\n");
|
av_log(s, AV_LOG_ERROR, "Overflow in display width\n");
|
||||||
return AVERROR(EINVAL);
|
return AVERROR(EINVAL);
|
||||||
}
|
}
|
||||||
put_ebml_uint(pb, MATROSKA_ID_VIDEODISPLAYWIDTH , d_width / display_width_div);
|
if (d_width != par->width || display_width_div != 1 || display_height_div != 1) {
|
||||||
put_ebml_uint(pb, MATROSKA_ID_VIDEODISPLAYHEIGHT, par->height / display_height_div);
|
put_ebml_uint(pb, MATROSKA_ID_VIDEODISPLAYWIDTH , d_width / display_width_div);
|
||||||
|
put_ebml_uint(pb, MATROSKA_ID_VIDEODISPLAYHEIGHT, par->height / display_height_div);
|
||||||
|
}
|
||||||
} else if (display_width_div != 1 || display_height_div != 1) {
|
} else if (display_width_div != 1 || display_height_div != 1) {
|
||||||
put_ebml_uint(pb, MATROSKA_ID_VIDEODISPLAYWIDTH , par->width / display_width_div);
|
put_ebml_uint(pb, MATROSKA_ID_VIDEODISPLAYWIDTH , par->width / display_width_div);
|
||||||
put_ebml_uint(pb, MATROSKA_ID_VIDEODISPLAYHEIGHT, par->height / display_height_div);
|
put_ebml_uint(pb, MATROSKA_ID_VIDEODISPLAYHEIGHT, par->height / display_height_div);
|
||||||
|
|
|
@ -4,6 +4,6 @@
|
||||||
FATE_MATROSKA-$(call DEMMUX, MATROSKA, MATROSKA) += fate-matroska-remux
|
FATE_MATROSKA-$(call DEMMUX, MATROSKA, MATROSKA) += fate-matroska-remux
|
||||||
fate-matroska-remux: CMD = md5 -i $(TARGET_SAMPLES)/vp9-test-vectors/vp90-2-2pass-akiyo.webm -color_trc 4 -c:v copy -fflags +bitexact -strict -2 -f matroska
|
fate-matroska-remux: CMD = md5 -i $(TARGET_SAMPLES)/vp9-test-vectors/vp90-2-2pass-akiyo.webm -color_trc 4 -c:v copy -fflags +bitexact -strict -2 -f matroska
|
||||||
fate-matroska-remux: CMP = oneline
|
fate-matroska-remux: CMP = oneline
|
||||||
fate-matroska-remux: REF = 84e950f59677e306f944fca484888c5d
|
fate-matroska-remux: REF = 9b8398b42804ba12c39d2f47299a0996
|
||||||
|
|
||||||
FATE_SAMPLES_AVCONV += $(FATE_MATROSKA-yes)
|
FATE_SAMPLES_AVCONV += $(FATE_MATROSKA-yes)
|
||||||
|
|
Loading…
Reference in New Issue