#64 closed defect (fixed)
[Patch] fix detection of MP3s with junk at beginning
Reported by: | Owned by: | reimar | |
---|---|---|---|
Priority: | normal | Component: | demuxer |
Version: | HEAD | Severity: | normal |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Reproduced by developer: | no | Analyzed by developer: | no |
Description
If there is junk at the beginning of an mp3 which looks at first sight
as if it were an mp3 header but is not followed by valid mp3 headers
the file gets simply discarded.
Fixing Patch attached.
Attachments (2)
Change History (5)
by , 20 years ago
Attachment: | audio_detect.diff added |
---|
comment:2 by , 20 years ago
attachments.isobsolete: | 0 → 1 |
---|---|
Owner: | changed from | to
Status: | new → assigned |
a few comments about your patch first:
you did some changes that make it hard to find out what your patch changes,
like renaming step to bytes_to_read. I admit that this makes the resulting code
easier to read, but not the patch!
The main problem is that your patch relies heavily on the ability to seek
backwards in a stream - something that is not always possible.
try e.g. cat test.mp3 | ./mplayer -v -nocache -demuxer 17 -
to see the effect. At least for that case MPlayer still wouldn't detect some
MP3s correctly.
That's why I would propose my attached patch, which does not need to seek
backwards at all but is a bit more complicated. Please test it.
P.S.: I'm not sure if the modification to libmpdemux/stream.c is correct, but
the original code made MPlayer seek forward when attempting to seek backwards
in a linear stream.
comment:3 by , 20 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Applied my version without the change to libmpdemux/stream.c
It fixed all problems for me. If you still have problems, please reopen this bug.
Fixes the problem