[FFmpeg-devel] [PATCH] lavf/mp3dec: increase probe score of buffers entirely composed of valid packets

Carl Eugen Hoyos ceffmpeg at gmail.com
Sun Sep 22 00:07:30 EEST 2019


Am Sa., 21. Sept. 2019 um 20:16 Uhr schrieb Rodger Combs
<rodger.combs at gmail.com>:
>
> Fixes some files misdetecting as MPEG PS

The reason for the misdetection (mp3 file with 50k header that contains a
mjpeg cover) are the following "lame tags" (I couldn't immediately find out
what they really are) which nearly all contain "02 ae" which is identified as
VIDEO_ID by the mpegps probe function. The video variable is 9 after 64k
of the function, all other relevant variables are 0):

0000e880  00 00 00 00 00 00 00 00  00 00 00 00 00 ff fb e2  |................|
0000e890  44 00 0f f0 78 00 ab 83  e0 00 00 0e 80 16 c0 7c  |D...x..........||
0000e8a0  00 00 01 e0 02 ae 0f 80  00 00 3a 00 5b 01 f0 00  |..........:.[...|
0000e8b0  00 2b f4 b7 ff ff ff ff  ff d3 ff ff ff ff ff e9  |.+..............|
0000e8c0  2b e8 3b ff ff ff ff ff  ff ff ff ff ff fe 82 bf  |+.;.............|
0000e8d0  4b 7f ff ff ff ff fd 3f  ff ff ff ff fe 92 be 83  |K......?........|
0000e8e0  bf ff ff ff ff ff ff ff  ff ff ff e8 4c 41 4d 45  |............LAME|
0000e8f0  33 2e 39 38 2e 32 00 00  00 00 00 00 00 00 00 00  |3.98.2..........|
0000e900  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
0000eca0  00 00 ff fb e2 44 00 0f  f0 78 00 ab 83 e0 00 00  |.....D...x......|
0000ecb0  0e 80 16 c0 7c 00 00 01  e0 02 ae 0f 80 00 00 3a  |....|..........:|
0000ecc0  00 5b 01 f0 00 00 2b f4  b7 ff ff ff ff ff d3 ff  |.[....+.........|
0000ecd0  ff ff ff ff e9 2b e8 3b  ff ff ff ff ff ff ff ff  |.....+.;........|
0000ece0  ff ff fe 82 bf 4b 7f ff  ff ff ff fd 3f ff ff ff  |.....K......?...|
0000ecf0  ff fe 92 be 83 bf ff ff  ff ff ff ff ff ff ff ff  |................|
0000ed00  e8 4c 41 4d 45 33 2e 39  38 2e 32 00 00 00 00 00  |.LAME3.98.2.....|
0000ed10  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
0000f0b0  00 00 00 00 00 00 00 ff  fb e2 44 00 0f f0 78 00  |..........D...x.|
0000f0c0  ab 83 e0 00 00 0e 80 16  c0 7c 00 00 01 e0 02 ae  |.........|......|
0000f0d0  0f 80 00 00 3a 00 5b 01  f0 00 00 2b f4 b7 ff ff  |....:.[....+....|
0000f0e0  ff ff ff d3 ff ff ff ff  ff e9 2b e8 3b ff ff ff  |..........+.;...|
0000f0f0  ff ff ff ff ff ff ff fe  82 bf 4b 7f ff ff ff ff  |..........K.....|
0000f100  fd 3f ff ff ff ff fe 92  be 83 bf ff ff ff ff ff  |.?..............|
0000f110  ff ff ff ff ff e8 4c 41  4d 45 33 2e 39 38 2e 32  |......LAME3.98.2|
0000f120  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
0000f4c0  00 00 00 00 00 00 00 00  00 00 00 00 ff fb e2 44  |...............D|
0000f4d0  00 0f f0 78 00 ab 83 e0  00 00 0e 80 16 c0 7c 00  |...x..........|.|
0000f4e0  00 01 e0 02 ae 0f 80 00  00 3a 00 5b 01 f0 00 00  |.........:.[....|
0000f4f0  2b f4 b7 ff ff ff ff ff  d3 ff ff ff ff ff e9 2b  |+..............+|
0000f500  e8 3b ff ff ff ff ff ff  ff ff ff ff fe 82 bf 4b  |.;.............K|
0000f510  7f ff ff ff ff fd 3f ff  ff ff ff fe 92 be 83 bf  |......?.........|
0000f520  ff ff ff ff ff ff ff ff  ff ff e8 4c 41 4d 45 33  |...........LAME3|
0000f530  2e 39 38 2e 32 00 00 00  00 00 00 00 00 00 00 00  |.98.2...........|
0000f540  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
0000f8e0  00 ff fb e2 44 00 0f f0  78 00 ab 83 e0 00 00 0e  |....D...x.......|
0000f8f0  80 16 c0 7c 00 00 01 e0  02 ae 0f 80 00 00 3a 00  |...|..........:.|
0000f900  5b 01 f0 00 00 2b f4 b7  ff ff ff ff ff d3 ff ff  |[....+..........|
0000f910  ff ff ff e9 2b e8 3b ff  ff ff ff ff ff ff ff ff  |....+.;.........|
0000f920  ff fe 82 bf 4b 7f ff ff  ff ff fd 3f ff ff ff ff  |....K......?....|
0000f930  fe 92 be 83 bf ff ff ff  ff ff ff ff ff ff ff e8  |................|
0000f940  4c 41 4d 45 33 2e 39 38  2e 32 00 00 00 00 00 00  |LAME3.98.2......|
0000f950  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
0000fcf0  00 00 00 00 00 00 ff fb  e2 44 00 0f f0 78 00 ab  |.........D...x..|
0000fd00  83 e0 00 00 0e 80 16 c0  7c 00 00 01 e0 02 ae 0f  |........|.......|
0000fd10  80 00 00 3a 00 5b 01 f0  00 00 2b f4 b7 ff ff ff  |...:.[....+.....|
0000fd20  ff ff d3 ff ff ff ff ff  e9 2b e8 3b ff ff ff ff  |.........+.;....|
0000fd30  ff ff ff ff ff ff fe 82  bf 4b 7f ff ff ff ff fd  |.........K......|
0000fd40  3f ff ff ff ff fe 92 be  83 bf ff ff ff ff ff ff  |?...............|
0000fd50  ff ff ff ff e8 4c 41 4d  45 33 2e 39 38 2e 32 00  |.....LAME3.98.2.|
0000fd60  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|

I would expect that it is possible to detect that the above are not valid
mpeg video packets.

Carl Eugen


More information about the ffmpeg-devel mailing list