diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2016-03-28 20:40:40 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2016-06-05 20:55:09 +0200 |
commit | f730367a60e343f293a997d8ee43aed8c68a6364 (patch) | |
tree | cea3167fa771e7a6f8ea0bf6a98f4bcec8868be9 | |
parent | 87c53e53545fd5f3d27b84f421c53e5a598c1bd8 (diff) | |
download | ffmpeg-streaming-f730367a60e343f293a997d8ee43aed8c68a6364.zip ffmpeg-streaming-f730367a60e343f293a997d8ee43aed8c68a6364.tar.gz |
avcodec/mpeg4videodec: Fix default low_delay flag value if not coded
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/mpeg4videodec.c | 12 | ||||
-rw-r--r-- | tests/ref/fate/iv8-demux | 48 | ||||
-rw-r--r-- | tests/ref/fate/nc-demux | 182 |
3 files changed, 125 insertions, 117 deletions
diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c index 35d182d..1fef372 100644 --- a/libavcodec/mpeg4videodec.c +++ b/libavcodec/mpeg4videodec.c @@ -1754,8 +1754,16 @@ static int decode_vol_header(Mpeg4DecContext *ctx, GetBitContext *gb) } else { /* is setting low delay flag only once the smartest thing to do? * low delay detection won't be overridden. */ - if (s->picture_number == 0) - s->low_delay = 0; + if (s->picture_number == 0) { + switch(s->vo_type) { + case SIMPLE_VO_TYPE: + case ADV_SIMPLE_VO_TYPE: + s->low_delay = 1; + break; + default: + s->low_delay = 0; + } + } } ctx->shape = get_bits(gb, 2); /* vol shape */ diff --git a/tests/ref/fate/iv8-demux b/tests/ref/fate/iv8-demux index ddb110a..518f3de 100644 --- a/tests/ref/fate/iv8-demux +++ b/tests/ref/fate/iv8-demux @@ -5,27 +5,27 @@ #dimensions 0: 704x576 #sar 0: 1/1 0, 0, 0, 0, 20883, 0x347191e2 -0, 0, 3600, 0, 20882, 0xe1573905 -0, 3600, 7200, 0, 20894, 0xd54f516a -0, 7200, 10800, 0, 20891, 0x1b5c5039 -0, 10800, 14400, 0, 20883, 0x8e785b4d -0, 14400, 18000, 0, 20870, 0xd26ca1f6 -0, 18000, 21600, 0, 21448, 0x946f5b2b -0, 21600, 25200, 0, 21433, 0xb18687c5 -0, 25200, 28800, 0, 20865, 0xc0eb3fce -0, 28800, 32399, 0, 20842, 0x9d0728ba -0, 32399, 35999, 0, 20878, 0xf60f5dee -0, 35999, 39600, 0, 20866, 0x3bde568f -0, 39600, 43200, 0, 20884, 0x22736993 -0, 43200, 46800, 0, 20860, 0xf56f2fca -0, 46800, 50400, 0, 20872, 0xf39e3cb3 -0, 50400, 53999, 0, 20835, 0xa3c4363b -0, 53999, 57600, 0, 20905, 0x552853d1 -0, 57600, 61200, 0, 20874, 0xed0b91ec -0, 61200, 64799, 0, 20877, 0xe1623e01 -0, 64799, 68399, 0, 20933, 0x19906564 -0, 68399, 72000, 0, 20891, 0x3d064fd3 -0, 72000, 75600, 0, 20834, 0xcb774dbc -0, 75600, 79200, 0, 20870, 0xbc536589 -0, 79200, 82800, 0, 21421, 0xc99a68e4 -0, 82800, 86400, 0, 12869, 0x5684e304 +0, 3600, 3600, 0, 20882, 0xe1573905 +0, 7200, 7200, 0, 20894, 0xd54f516a +0, 10800, 10800, 0, 20891, 0x1b5c5039 +0, 14400, 14400, 0, 20883, 0x8e785b4d +0, 18000, 18000, 0, 20870, 0xd26ca1f6 +0, 21600, 21600, 0, 21448, 0x946f5b2b +0, 25200, 25200, 0, 21433, 0xb18687c5 +0, 28800, 28800, 0, 20865, 0xc0eb3fce +0, 32399, 32399, 0, 20842, 0x9d0728ba +0, 35999, 35999, 0, 20878, 0xf60f5dee +0, 39600, 39600, 0, 20866, 0x3bde568f +0, 43200, 43200, 0, 20884, 0x22736993 +0, 46800, 46800, 0, 20860, 0xf56f2fca +0, 50400, 50400, 0, 20872, 0xf39e3cb3 +0, 53999, 53999, 0, 20835, 0xa3c4363b +0, 57600, 57600, 0, 20905, 0x552853d1 +0, 61200, 61200, 0, 20874, 0xed0b91ec +0, 64799, 64799, 0, 20877, 0xe1623e01 +0, 68399, 68399, 0, 20933, 0x19906564 +0, 72000, 72000, 0, 20891, 0x3d064fd3 +0, 75600, 75600, 0, 20834, 0xcb774dbc +0, 79200, 79200, 0, 20870, 0xbc536589 +0, 82800, 82800, 0, 21421, 0xc99a68e4 +0, 86400, 86400, 0, 12869, 0x5684e304 diff --git a/tests/ref/fate/nc-demux b/tests/ref/fate/nc-demux index 571665e..006addc 100644 --- a/tests/ref/fate/nc-demux +++ b/tests/ref/fate/nc-demux @@ -4,94 +4,94 @@ #codec_id 0: mpeg4 #dimensions 0: 720x576 #sar 0: 1/1 -0, 0, -9223372036854775808, 1, 19787, 0x75e463f3 -0, 1, -9223372036854775808, 1, 11913, 0x0f429c34, F=0x0 -0, 2, -9223372036854775808, 1, 14225, 0xbd3c704c, F=0x0 -0, 3, -9223372036854775808, 1, 10357, 0xbf232393, F=0x0 -0, 4, -9223372036854775808, 1, 9595, 0xf565d39e, F=0x0 -0, 5, -9223372036854775808, 1, 9262, 0x2afd6ce0, F=0x0 -0, 6, -9223372036854775808, 1, 12214, 0x6ae81d9b, F=0x0 -0, 7, -9223372036854775808, 1, 13920, 0x31b5b307, F=0x0 -0, 8, -9223372036854775808, 1, 10164, 0x141eca4e, F=0x0 -0, 9, -9223372036854775808, 1, 9516, 0xd5f2c42b, F=0x0 -0, 10, -9223372036854775808, 1, 10006, 0x80850a76, F=0x0 -0, 11, -9223372036854775808, 1, 11791, 0x10bc2dcd, F=0x0 -0, 12, -9223372036854775808, 1, 13756, 0xda1fee08, F=0x0 -0, 13, -9223372036854775808, 1, 10452, 0xbb3d62b0, F=0x0 -0, 14, -9223372036854775808, 1, 9171, 0x64ae10f6, F=0x0 -0, 15, -9223372036854775808, 1, 8816, 0x31ad8fcb, F=0x0 -0, 16, -9223372036854775808, 1, 13168, 0xea1085ac, F=0x0 -0, 17, -9223372036854775808, 1, 12797, 0x25143d22, F=0x0 -0, 18, -9223372036854775808, 1, 11324, 0x3a54b38e, F=0x0 -0, 19, -9223372036854775808, 1, 9173, 0x8b2bf552, F=0x0 -0, 20, -9223372036854775808, 1, 9247, 0x2e87226b, F=0x0 -0, 21, -9223372036854775808, 1, 14140, 0x1063786c, F=0x0 -0, 22, -9223372036854775808, 1, 14437, 0xde123a17, F=0x0 -0, 23, -9223372036854775808, 1, 11938, 0x3f1168f4, F=0x0 -0, 24, -9223372036854775808, 1, 11966, 0xdd6786ec, F=0x0 -0, 25, -9223372036854775808, 1, 13213, 0x8ab27c58, F=0x0 -0, 26, -9223372036854775808, 1, 11843, 0x90415d8b, F=0x0 -0, 27, -9223372036854775808, 1, 13345, 0x3c0e1793, F=0x0 -0, 28, -9223372036854775808, 1, 9977, 0x74fc7f4b, F=0x0 -0, 29, -9223372036854775808, 1, 9158, 0x0b5426a5, F=0x0 -0, 30, -9223372036854775808, 1, 12715, 0x0035d569, F=0x0 -0, 31, -9223372036854775808, 1, 19944, 0xe2887ba8 -0, 32, -9223372036854775808, 1, 12762, 0xb0f17939, F=0x0 -0, 33, -9223372036854775808, 1, 10260, 0x182b27aa, F=0x0 -0, 34, -9223372036854775808, 1, 7405, 0x227fe9bf, F=0x0 -0, 35, -9223372036854775808, 1, 13317, 0x1a678c62, F=0x0 -0, 36, -9223372036854775808, 1, 11304, 0x3277af6d, F=0x0 -0, 37, -9223372036854775808, 1, 13291, 0xe267616a, F=0x0 -0, 38, -9223372036854775808, 1, 8975, 0xe7eeacea, F=0x0 -0, 39, -9223372036854775808, 1, 8473, 0x8bb1cbff, F=0x0 -0, 40, -9223372036854775808, 1, 13878, 0xfd3d55bb, F=0x0 -0, 41, -9223372036854775808, 1, 11278, 0x61c7c55e, F=0x0 -0, 42, -9223372036854775808, 1, 13785, 0x2acbf88f, F=0x0 -0, 43, -9223372036854775808, 1, 9521, 0x99e2d065, F=0x0 -0, 44, -9223372036854775808, 1, 9340, 0xe5c96510, F=0x0 -0, 45, -9223372036854775808, 1, 12777, 0x4c3c7844, F=0x0 -0, 46, -9223372036854775808, 1, 10685, 0x39e0f42e, F=0x0 -0, 47, -9223372036854775808, 1, 14237, 0x9398d07f, F=0x0 -0, 48, -9223372036854775808, 1, 9021, 0x3343c7ec, F=0x0 -0, 49, -9223372036854775808, 1, 9327, 0xad489e86, F=0x0 -0, 50, -9223372036854775808, 1, 13507, 0xb1344f1c, F=0x0 -0, 51, -9223372036854775808, 1, 10199, 0x9a8868bf, F=0x0 -0, 52, -9223372036854775808, 1, 14535, 0xddb13f41, F=0x0 -0, 53, -9223372036854775808, 1, 8773, 0x3d8b6a79, F=0x0 -0, 54, -9223372036854775808, 1, 16084, 0x5d915de4, F=0x0 -0, 55, -9223372036854775808, 1, 9156, 0x5cb08a6a, F=0x0 -0, 56, -9223372036854775808, 1, 15027, 0xc23b1dc8, F=0x0 -0, 57, -9223372036854775808, 1, 8240, 0xd6d3526c, F=0x0 -0, 58, -9223372036854775808, 1, 8720, 0x439c43bf, F=0x0 -0, 59, -9223372036854775808, 1, 13684, 0x18fc82f0, F=0x0 -0, 60, -9223372036854775808, 1, 8829, 0xa3ebeb30, F=0x0 -0, 61, -9223372036854775808, 1, 14650, 0x99e8678c, F=0x0 -0, 62, -9223372036854775808, 1, 19626, 0x80a7ee5c -0, 63, -9223372036854775808, 1, 7762, 0x7c209a12, F=0x0 -0, 64, -9223372036854775808, 1, 13636, 0xc89c1aa3, F=0x0 -0, 65, -9223372036854775808, 1, 8337, 0x749bf76a, F=0x0 -0, 66, -9223372036854775808, 1, 15098, 0xc98bc6dc, F=0x0 -0, 67, -9223372036854775808, 1, 9070, 0xcd4cf7f1, F=0x0 -0, 68, -9223372036854775808, 1, 8269, 0x90e95d54, F=0x0 -0, 69, -9223372036854775808, 1, 12672, 0x034888d0, F=0x0 -0, 70, -9223372036854775808, 1, 7519, 0x6c089672, F=0x0 -0, 71, -9223372036854775808, 1, 14439, 0x5d2478b9, F=0x0 -0, 72, -9223372036854775808, 1, 6928, 0x98fbaa67, F=0x0 -0, 73, -9223372036854775808, 1, 8735, 0x07643f1e, F=0x0 -0, 74, -9223372036854775808, 1, 13522, 0x55034cdb, F=0x0 -0, 75, -9223372036854775808, 1, 7807, 0xf5983103, F=0x0 -0, 76, -9223372036854775808, 1, 14484, 0xfc9cf260, F=0x0 -0, 77, -9223372036854775808, 1, 7193, 0x170a0fa1, F=0x0 -0, 78, -9223372036854775808, 1, 9444, 0x6f9be36f, F=0x0 -0, 79, -9223372036854775808, 1, 12598, 0x69b7609d, F=0x0 -0, 80, -9223372036854775808, 1, 7650, 0x1abaec9e, F=0x0 -0, 81, -9223372036854775808, 1, 15162, 0x2a87f723, F=0x0 -0, 82, -9223372036854775808, 1, 7752, 0xcca248aa, F=0x0 -0, 83, -9223372036854775808, 1, 9085, 0x1ca7d7e5, F=0x0 -0, 84, -9223372036854775808, 1, 13187, 0xababcc64, F=0x0 -0, 85, -9223372036854775808, 1, 7968, 0x64a28f46, F=0x0 -0, 86, -9223372036854775808, 1, 15474, 0xf34c587c, F=0x0 -0, 87, -9223372036854775808, 1, 8615, 0x61301034, F=0x0 -0, 88, -9223372036854775808, 1, 14129, 0x42c88bea, F=0x0 -0, 89, -9223372036854775808, 1, 7223, 0x675d7500, F=0x0 -0, 90, -9223372036854775808, 1, 3072, 0x4cb6254c, F=0x0 +0, 0, 0, 1, 19787, 0x75e463f3 +0, 1, 1, 1, 11913, 0x0f429c34, F=0x0 +0, 2, 2, 1, 14225, 0xbd3c704c, F=0x0 +0, 3, 3, 1, 10357, 0xbf232393, F=0x0 +0, 4, 4, 1, 9595, 0xf565d39e, F=0x0 +0, 5, 5, 1, 9262, 0x2afd6ce0, F=0x0 +0, 6, 6, 1, 12214, 0x6ae81d9b, F=0x0 +0, 7, 7, 1, 13920, 0x31b5b307, F=0x0 +0, 8, 8, 1, 10164, 0x141eca4e, F=0x0 +0, 9, 9, 1, 9516, 0xd5f2c42b, F=0x0 +0, 10, 10, 1, 10006, 0x80850a76, F=0x0 +0, 11, 11, 1, 11791, 0x10bc2dcd, F=0x0 +0, 12, 12, 1, 13756, 0xda1fee08, F=0x0 +0, 13, 13, 1, 10452, 0xbb3d62b0, F=0x0 +0, 14, 14, 1, 9171, 0x64ae10f6, F=0x0 +0, 15, 15, 1, 8816, 0x31ad8fcb, F=0x0 +0, 16, 16, 1, 13168, 0xea1085ac, F=0x0 +0, 17, 17, 1, 12797, 0x25143d22, F=0x0 +0, 18, 18, 1, 11324, 0x3a54b38e, F=0x0 +0, 19, 19, 1, 9173, 0x8b2bf552, F=0x0 +0, 20, 20, 1, 9247, 0x2e87226b, F=0x0 +0, 21, 21, 1, 14140, 0x1063786c, F=0x0 +0, 22, 22, 1, 14437, 0xde123a17, F=0x0 +0, 23, 23, 1, 11938, 0x3f1168f4, F=0x0 +0, 24, 24, 1, 11966, 0xdd6786ec, F=0x0 +0, 25, 25, 1, 13213, 0x8ab27c58, F=0x0 +0, 26, 26, 1, 11843, 0x90415d8b, F=0x0 +0, 27, 27, 1, 13345, 0x3c0e1793, F=0x0 +0, 28, 28, 1, 9977, 0x74fc7f4b, F=0x0 +0, 29, 29, 1, 9158, 0x0b5426a5, F=0x0 +0, 30, 30, 1, 12715, 0x0035d569, F=0x0 +0, 31, 31, 1, 19944, 0xe2887ba8 +0, 32, 32, 1, 12762, 0xb0f17939, F=0x0 +0, 33, 33, 1, 10260, 0x182b27aa, F=0x0 +0, 34, 34, 1, 7405, 0x227fe9bf, F=0x0 +0, 35, 35, 1, 13317, 0x1a678c62, F=0x0 +0, 36, 36, 1, 11304, 0x3277af6d, F=0x0 +0, 37, 37, 1, 13291, 0xe267616a, F=0x0 +0, 38, 38, 1, 8975, 0xe7eeacea, F=0x0 +0, 39, 39, 1, 8473, 0x8bb1cbff, F=0x0 +0, 40, 40, 1, 13878, 0xfd3d55bb, F=0x0 +0, 41, 41, 1, 11278, 0x61c7c55e, F=0x0 +0, 42, 42, 1, 13785, 0x2acbf88f, F=0x0 +0, 43, 43, 1, 9521, 0x99e2d065, F=0x0 +0, 44, 44, 1, 9340, 0xe5c96510, F=0x0 +0, 45, 45, 1, 12777, 0x4c3c7844, F=0x0 +0, 46, 46, 1, 10685, 0x39e0f42e, F=0x0 +0, 47, 47, 1, 14237, 0x9398d07f, F=0x0 +0, 48, 48, 1, 9021, 0x3343c7ec, F=0x0 +0, 49, 49, 1, 9327, 0xad489e86, F=0x0 +0, 50, 50, 1, 13507, 0xb1344f1c, F=0x0 +0, 51, 51, 1, 10199, 0x9a8868bf, F=0x0 +0, 52, 52, 1, 14535, 0xddb13f41, F=0x0 +0, 53, 53, 1, 8773, 0x3d8b6a79, F=0x0 +0, 54, 54, 1, 16084, 0x5d915de4, F=0x0 +0, 55, 55, 1, 9156, 0x5cb08a6a, F=0x0 +0, 56, 56, 1, 15027, 0xc23b1dc8, F=0x0 +0, 57, 57, 1, 8240, 0xd6d3526c, F=0x0 +0, 58, 58, 1, 8720, 0x439c43bf, F=0x0 +0, 59, 59, 1, 13684, 0x18fc82f0, F=0x0 +0, 60, 60, 1, 8829, 0xa3ebeb30, F=0x0 +0, 61, 61, 1, 14650, 0x99e8678c, F=0x0 +0, 62, 62, 1, 19626, 0x80a7ee5c +0, 63, 63, 1, 7762, 0x7c209a12, F=0x0 +0, 64, 64, 1, 13636, 0xc89c1aa3, F=0x0 +0, 65, 65, 1, 8337, 0x749bf76a, F=0x0 +0, 66, 66, 1, 15098, 0xc98bc6dc, F=0x0 +0, 67, 67, 1, 9070, 0xcd4cf7f1, F=0x0 +0, 68, 68, 1, 8269, 0x90e95d54, F=0x0 +0, 69, 69, 1, 12672, 0x034888d0, F=0x0 +0, 70, 70, 1, 7519, 0x6c089672, F=0x0 +0, 71, 71, 1, 14439, 0x5d2478b9, F=0x0 +0, 72, 72, 1, 6928, 0x98fbaa67, F=0x0 +0, 73, 73, 1, 8735, 0x07643f1e, F=0x0 +0, 74, 74, 1, 13522, 0x55034cdb, F=0x0 +0, 75, 75, 1, 7807, 0xf5983103, F=0x0 +0, 76, 76, 1, 14484, 0xfc9cf260, F=0x0 +0, 77, 77, 1, 7193, 0x170a0fa1, F=0x0 +0, 78, 78, 1, 9444, 0x6f9be36f, F=0x0 +0, 79, 79, 1, 12598, 0x69b7609d, F=0x0 +0, 80, 80, 1, 7650, 0x1abaec9e, F=0x0 +0, 81, 81, 1, 15162, 0x2a87f723, F=0x0 +0, 82, 82, 1, 7752, 0xcca248aa, F=0x0 +0, 83, 83, 1, 9085, 0x1ca7d7e5, F=0x0 +0, 84, 84, 1, 13187, 0xababcc64, F=0x0 +0, 85, 85, 1, 7968, 0x64a28f46, F=0x0 +0, 86, 86, 1, 15474, 0xf34c587c, F=0x0 +0, 87, 87, 1, 8615, 0x61301034, F=0x0 +0, 88, 88, 1, 14129, 0x42c88bea, F=0x0 +0, 89, 89, 1, 7223, 0x675d7500, F=0x0 +0, 90, 90, 1, 3072, 0x4cb6254c, F=0x0 |