History

lavc/mpeg4videodec: do not invent a framerate from guessed numbers

Improves timestamps for fate-m4v*

Anton Khirnov committed 3 years ago

Commit cdfd15f1 parent 4a376f43 files · +43 −45Browse files

Unified · Split

3 files
  1. libavcodec/mpeg4videodec.c +0 −3
  2. tests/ref/fate/m4v +42 −42
  3. tests/ref/fate/m4v-cfr +1 −0
libavcodec/mpeg4videodec.c+0−3
@@ -3141,9 +3141,6 @@ static int decode_vop_header(Mpeg4DecContext *ctx, GetBitContext *gb, · 3140 unmodified lines
3141 3141
3142 av_log(s->avctx, AV_LOG_WARNING,3142 av_log(s->avctx, AV_LOG_WARNING,
3143 "time_increment_bits set to %d bits, based on bitstream analysis\n", ctx->time_increment_bits);3143 "time_increment_bits set to %d bits, based on bitstream analysis\n", ctx->time_increment_bits);
3144 if (s->avctx->framerate.num && 4*s->avctx->framerate.num < 1<<ctx->time_increment_bits) {
3145 s->avctx->framerate.num = 1<<ctx->time_increment_bits;
3146 }
3147 }3144 }
3148 3145
3149 if (IS_3IV1)3146 if (IS_3IV1)
tests/ref/fate/m4v+42−42
@@ -1,47 +1,47 @@
1#tb 0: 1/601#tb 0: 1/5
2#media_type 0: video2#media_type 0: video
3#codec_id 0: rawvideo3#codec_id 0: rawvideo
4#dimensions 0: 320x2404#dimensions 0: 320x240
5#sar 0: 1/15#sar 0: 1/1
60, 0, 0, 1, 115200, 0x7262156b60, 0, 0, 1, 115200, 0x7262156b
70, 11, 11, 1, 115200, 0xa6aebc2f70, 1, 1, 1, 115200, 0xa6aebc2f
80, 22, 22, 1, 115200, 0x9c7beba180, 2, 2, 1, 115200, 0x9c7beba1
90, 33, 33, 1, 115200, 0x556037a290, 3, 3, 1, 115200, 0x556037a2
100, 44, 44, 1, 115200, 0x532e3a23100, 4, 4, 1, 115200, 0x532e3a23
110, 60, 60, 1, 115200, 0x110511f4110, 5, 5, 1, 115200, 0x110511f4
120, 71, 71, 1, 115200, 0xb7f929a4120, 6, 6, 1, 115200, 0xb7f929a4
130, 82, 82, 1, 115200, 0xdab9f3c2130, 7, 7, 1, 115200, 0xdab9f3c2
140, 93, 93, 1, 115200, 0x441413dd140, 8, 8, 1, 115200, 0x441413dd
150, 104, 104, 1, 115200, 0x01163f33150, 9, 9, 1, 115200, 0x01163f33
160, 120, 120, 1, 115200, 0x47720c78160, 10, 10, 1, 115200, 0x47720c78
170, 131, 131, 1, 115200, 0x07c21356170, 11, 11, 1, 115200, 0x07c21356
180, 142, 142, 1, 115200, 0x085d4291180, 12, 12, 1, 115200, 0x085d4291
190, 153, 153, 1, 115200, 0xf6db074c190, 13, 13, 1, 115200, 0xf6db074c
200, 164, 164, 1, 115200, 0x95093e75200, 14, 14, 1, 115200, 0x95093e75
210, 180, 180, 1, 115200, 0x5f8118ef210, 15, 15, 1, 115200, 0x5f8118ef
220, 191, 191, 1, 115200, 0x2b4de34a220, 16, 16, 1, 115200, 0x2b4de34a
230, 202, 202, 1, 115200, 0x0a731857230, 17, 17, 1, 115200, 0x0a731857
240, 213, 213, 1, 115200, 0xd75ef3be240, 18, 18, 1, 115200, 0xd75ef3be
250, 224, 224, 1, 115200, 0x321cf5a9250, 19, 19, 1, 115200, 0x321cf5a9
260, 240, 240, 1, 115200, 0x3eb222fd260, 20, 20, 1, 115200, 0x3eb222fd
270, 251, 251, 1, 115200, 0xc7d92f3e270, 21, 21, 1, 115200, 0xc7d92f3e
280, 262, 262, 1, 115200, 0x6fda0366280, 22, 22, 1, 115200, 0x6fda0366
290, 273, 273, 1, 115200, 0x6bb61b03290, 23, 23, 1, 115200, 0x6bb61b03
300, 284, 284, 1, 115200, 0x5f367ef8300, 24, 24, 1, 115200, 0x5f367ef8
310, 300, 300, 1, 115200, 0x237d0c77310, 25, 25, 1, 115200, 0x237d0c77
320, 311, 311, 1, 115200, 0xafa813ef320, 26, 26, 1, 115200, 0xafa813ef
330, 322, 322, 1, 115200, 0x39263ef4330, 27, 27, 1, 115200, 0x39263ef4
340, 333, 333, 1, 115200, 0x47c70441340, 28, 28, 1, 115200, 0x47c70441
350, 344, 344, 1, 115200, 0xd43fffb0350, 29, 29, 1, 115200, 0xd43fffb0
360, 360, 360, 1, 115200, 0x75696afb360, 30, 30, 1, 115200, 0x75696afb
370, 371, 371, 1, 115200, 0xb0f117a3370, 31, 31, 1, 115200, 0xb0f117a3
380, 382, 382, 1, 115200, 0x002f42f0380, 32, 32, 1, 115200, 0x002f42f0
390, 393, 393, 1, 115200, 0xa192487e390, 33, 33, 1, 115200, 0xa192487e
400, 404, 404, 1, 115200, 0x19a7072e400, 34, 34, 1, 115200, 0x19a7072e
410, 420, 420, 1, 115200, 0xc500669c410, 35, 35, 1, 115200, 0xc500669c
420, 431, 431, 1, 115200, 0xe4636ba9420, 36, 36, 1, 115200, 0xe4636ba9
430, 442, 442, 1, 115200, 0xdf3d5d86430, 37, 37, 1, 115200, 0xdf3d5d86
440, 453, 453, 1, 115200, 0xf30825d5440, 38, 38, 1, 115200, 0xf30825d5
450, 464, 464, 1, 115200, 0xe3c944a1450, 39, 39, 1, 115200, 0xe3c944a1
460, 480, 480, 1, 115200, 0x8fec4420460, 40, 40, 1, 115200, 0x8fec4420
470, 491, 491, 1, 115200, 0x9381fdab470, 41, 41, 1, 115200, 0x9381fdab
tests/ref/fate/m4v-cfr+1−0
@@ -44,3 +44,4 @@ · 43 unmodified lines
440, 38, 38, 1, 115200, 0xf30825d5440, 38, 38, 1, 115200, 0xf30825d5
450, 39, 39, 1, 115200, 0xe3c944a1450, 39, 39, 1, 115200, 0xe3c944a1
460, 40, 40, 1, 115200, 0x8fec4420460, 40, 40, 1, 115200, 0x8fec4420
470, 41, 41, 1, 115200, 0x9381fdab

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t