mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avformat/matroskaenc: write a DisplayUnit element when aspect ratio is unknown
We don't currently support values 1 (centimeters), 2 (inches) or 3 (DAR), only the default value 0 (pixels) which doesn't need to be written. The fate refs are updated as unknown SAR is now signaled in the output files with the addition of the new element. Reviewed-by: Carl Eugen Hoyos <ceffmpeg@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
bad8bbc26a
commit
90826031a2
@ -1197,7 +1197,8 @@ static int mkv_write_track(AVFormatContext *s, MatroskaMuxContext *mkv,
|
|||||||
} 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);
|
||||||
}
|
} else
|
||||||
|
put_ebml_uint(pb, MATROSKA_ID_VIDEODISPLAYUNIT, MATROSKA_VIDEO_DISPLAYUNIT_UNKNOWN);
|
||||||
|
|
||||||
if (par->codec_id == AV_CODEC_ID_RAWVIDEO) {
|
if (par->codec_id == AV_CODEC_ID_RAWVIDEO) {
|
||||||
uint32_t color_space = av_le2ne32(par->codec_tag);
|
uint32_t color_space = av_le2ne32(par->codec_tag);
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
5f43d628c76d97e30791bf30674ee485 *tests/data/fate/rgb24-mkv.matroska
|
7b8662e001bfb32a4bf709f4fe620138 *tests/data/fate/rgb24-mkv.matroska
|
||||||
58357 tests/data/fate/rgb24-mkv.matroska
|
58361 tests/data/fate/rgb24-mkv.matroska
|
||||||
#tb 0: 1/10
|
#tb 0: 1/10
|
||||||
#media_type 0: video
|
#media_type 0: video
|
||||||
#codec_id 0: rawvideo
|
#codec_id 0: rawvideo
|
||||||
#dimensions 0: 160x120
|
#dimensions 0: 160x120
|
||||||
#sar 0: 1/1
|
#sar 0: 0/1
|
||||||
0, 0, 0, 1, 57600, 0x3718ad00
|
0, 0, 0, 1, 57600, 0x3718ad00
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
a06683a6eb4af6fe8ffe5603c1942a97 *./tests/data/lavf/lavf.mkv
|
d23ff6ba071001256fa5073a0a528337 *./tests/data/lavf/lavf.mkv
|
||||||
472755 ./tests/data/lavf/lavf.mkv
|
472759 ./tests/data/lavf/lavf.mkv
|
||||||
./tests/data/lavf/lavf.mkv CRC=0xec6c3c68
|
./tests/data/lavf/lavf.mkv CRC=0xec6c3c68
|
||||||
c1009a6b9b4ef7e0eb0775d227131415 *./tests/data/lavf/lavf.mkv
|
e33c89229c7d5014137c7217f4547467 *./tests/data/lavf/lavf.mkv
|
||||||
320599 ./tests/data/lavf/lavf.mkv
|
320603 ./tests/data/lavf/lavf.mkv
|
||||||
./tests/data/lavf/lavf.mkv CRC=0xec6c3c68
|
./tests/data/lavf/lavf.mkv CRC=0xec6c3c68
|
||||||
|
@ -1,48 +1,48 @@
|
|||||||
ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 830 size: 208
|
ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 834 size: 208
|
||||||
ret: 0 st:-1 flags:0 ts:-1.000000
|
ret: 0 st:-1 flags:0 ts:-1.000000
|
||||||
ret: 0 st: 0 flags:1 dts: 0.011000 pts: 0.011000 pos: 1046 size: 27837
|
ret: 0 st: 0 flags:1 dts: 0.011000 pts: 0.011000 pos: 1050 size: 27837
|
||||||
ret: 0 st:-1 flags:1 ts: 1.894167
|
ret: 0 st:-1 flags:1 ts: 1.894167
|
||||||
ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 292472 size: 27834
|
ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 292476 size: 27834
|
||||||
ret: 0 st: 0 flags:0 ts: 0.788000
|
ret: 0 st: 0 flags:0 ts: 0.788000
|
||||||
ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 292472 size: 27834
|
ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 292476 size: 27834
|
||||||
ret: 0 st: 0 flags:1 ts:-0.317000
|
ret: 0 st: 0 flags:1 ts:-0.317000
|
||||||
ret: 0 st: 0 flags:1 dts: 0.011000 pts: 0.011000 pos: 1046 size: 27837
|
ret: 0 st: 0 flags:1 dts: 0.011000 pts: 0.011000 pos: 1050 size: 27837
|
||||||
ret:-1 st: 1 flags:0 ts: 2.577000
|
ret:-1 st: 1 flags:0 ts: 2.577000
|
||||||
ret: 0 st: 1 flags:1 ts: 1.471000
|
ret: 0 st: 1 flags:1 ts: 1.471000
|
||||||
ret: 0 st: 1 flags:1 dts: 0.993000 pts: 0.993000 pos: 320313 size: 209
|
ret: 0 st: 1 flags:1 dts: 0.993000 pts: 0.993000 pos: 320317 size: 209
|
||||||
ret: 0 st:-1 flags:0 ts: 0.365002
|
ret: 0 st:-1 flags:0 ts: 0.365002
|
||||||
ret: 0 st: 0 flags:1 dts: 0.491000 pts: 0.491000 pos: 147019 size: 27925
|
ret: 0 st: 0 flags:1 dts: 0.491000 pts: 0.491000 pos: 147023 size: 27925
|
||||||
ret: 0 st:-1 flags:1 ts:-0.740831
|
ret: 0 st:-1 flags:1 ts:-0.740831
|
||||||
ret: 0 st: 0 flags:1 dts: 0.011000 pts: 0.011000 pos: 1046 size: 27837
|
ret: 0 st: 0 flags:1 dts: 0.011000 pts: 0.011000 pos: 1050 size: 27837
|
||||||
ret:-1 st: 0 flags:0 ts: 2.153000
|
ret:-1 st: 0 flags:0 ts: 2.153000
|
||||||
ret: 0 st: 0 flags:1 ts: 1.048000
|
ret: 0 st: 0 flags:1 ts: 1.048000
|
||||||
ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 292472 size: 27834
|
ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 292476 size: 27834
|
||||||
ret: 0 st: 1 flags:0 ts:-0.058000
|
ret: 0 st: 1 flags:0 ts:-0.058000
|
||||||
ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 830 size: 208
|
ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 834 size: 208
|
||||||
ret: 0 st: 1 flags:1 ts: 2.836000
|
ret: 0 st: 1 flags:1 ts: 2.836000
|
||||||
ret: 0 st: 1 flags:1 dts: 0.993000 pts: 0.993000 pos: 320313 size: 209
|
ret: 0 st: 1 flags:1 dts: 0.993000 pts: 0.993000 pos: 320317 size: 209
|
||||||
ret:-1 st:-1 flags:0 ts: 1.730004
|
ret:-1 st:-1 flags:0 ts: 1.730004
|
||||||
ret: 0 st:-1 flags:1 ts: 0.624171
|
ret: 0 st:-1 flags:1 ts: 0.624171
|
||||||
ret: 0 st: 0 flags:1 dts: 0.491000 pts: 0.491000 pos: 147019 size: 27925
|
ret: 0 st: 0 flags:1 dts: 0.491000 pts: 0.491000 pos: 147023 size: 27925
|
||||||
ret: 0 st: 0 flags:0 ts:-0.482000
|
ret: 0 st: 0 flags:0 ts:-0.482000
|
||||||
ret: 0 st: 0 flags:1 dts: 0.011000 pts: 0.011000 pos: 1046 size: 27837
|
ret: 0 st: 0 flags:1 dts: 0.011000 pts: 0.011000 pos: 1050 size: 27837
|
||||||
ret: 0 st: 0 flags:1 ts: 2.413000
|
ret: 0 st: 0 flags:1 ts: 2.413000
|
||||||
ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 292472 size: 27834
|
ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 292476 size: 27834
|
||||||
ret:-1 st: 1 flags:0 ts: 1.307000
|
ret:-1 st: 1 flags:0 ts: 1.307000
|
||||||
ret: 0 st: 1 flags:1 ts: 0.201000
|
ret: 0 st: 1 flags:1 ts: 0.201000
|
||||||
ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 830 size: 208
|
ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 834 size: 208
|
||||||
ret: 0 st:-1 flags:0 ts:-0.904994
|
ret: 0 st:-1 flags:0 ts:-0.904994
|
||||||
ret: 0 st: 0 flags:1 dts: 0.011000 pts: 0.011000 pos: 1046 size: 27837
|
ret: 0 st: 0 flags:1 dts: 0.011000 pts: 0.011000 pos: 1050 size: 27837
|
||||||
ret: 0 st:-1 flags:1 ts: 1.989173
|
ret: 0 st:-1 flags:1 ts: 1.989173
|
||||||
ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 292472 size: 27834
|
ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 292476 size: 27834
|
||||||
ret: 0 st: 0 flags:0 ts: 0.883000
|
ret: 0 st: 0 flags:0 ts: 0.883000
|
||||||
ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 292472 size: 27834
|
ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 292476 size: 27834
|
||||||
ret: 0 st: 0 flags:1 ts:-0.222000
|
ret: 0 st: 0 flags:1 ts:-0.222000
|
||||||
ret: 0 st: 0 flags:1 dts: 0.011000 pts: 0.011000 pos: 1046 size: 27837
|
ret: 0 st: 0 flags:1 dts: 0.011000 pts: 0.011000 pos: 1050 size: 27837
|
||||||
ret:-1 st: 1 flags:0 ts: 2.672000
|
ret:-1 st: 1 flags:0 ts: 2.672000
|
||||||
ret: 0 st: 1 flags:1 ts: 1.566000
|
ret: 0 st: 1 flags:1 ts: 1.566000
|
||||||
ret: 0 st: 1 flags:1 dts: 0.993000 pts: 0.993000 pos: 320313 size: 209
|
ret: 0 st: 1 flags:1 dts: 0.993000 pts: 0.993000 pos: 320317 size: 209
|
||||||
ret: 0 st:-1 flags:0 ts: 0.460008
|
ret: 0 st:-1 flags:0 ts: 0.460008
|
||||||
ret: 0 st: 0 flags:1 dts: 0.491000 pts: 0.491000 pos: 147019 size: 27925
|
ret: 0 st: 0 flags:1 dts: 0.491000 pts: 0.491000 pos: 147023 size: 27925
|
||||||
ret: 0 st:-1 flags:1 ts:-0.645825
|
ret: 0 st:-1 flags:1 ts:-0.645825
|
||||||
ret: 0 st: 0 flags:1 dts: 0.011000 pts: 0.011000 pos: 1046 size: 27837
|
ret: 0 st: 0 flags:1 dts: 0.011000 pts: 0.011000 pos: 1050 size: 27837
|
||||||
|
Loading…
Reference in New Issue
Block a user