MediaArea / MediaInfoLib

Convenient unified display of the most relevant technical and tag data for video and audio files.
https://mediaarea.net/MediaInfo
BSD 2-Clause "Simplified" License
639 stars 177 forks source link

BITMAPINFOHEADER ignored #1605

Open fcartegnie opened 2 years ago

fcartegnie commented 2 years ago

Tricky issue.

We have received a sample with a strange mix:

Mediainfo detects it as MPEG-TS. To me it's wrong. It shouldn't try to probe further than the bitmap header.

Sample from https://code.videolan.org/videolan/vlc/-/issues/27407

JeromeMartinez commented 2 years ago

We definitely have to improve detection by a kind of priority per parser, currently the first parser catching something considered as acceptable "wins". Note that the same file with ".bmp" extension is correctly analyzed (BMP parser is tested first in that case).

JeromeMartinez commented 2 years ago

@fcartegnie I am wondering if it is worth it to detect and report that MPEG-TS content is found inside the fake BMP... Anyway, for when I have spare time for playing with such idiotic file crafted on purpose :-D.

robUx4 commented 2 years ago

Yes, that file is odd. It has a correct BMP header with correct TS data inside. It's like it was put in a BMP to hide the video.