[MPlayer-dev-eng] [PATCH] improving MP3 detection
Dominik 'Rathann' Mierzejewski
dominik at rangers.eu.org
Thu Sep 9 08:26:11 CEST 2004
On Wednesday, 08 September 2004 at 21:52, Reimar Döffinger wrote:
> Hi,
> the following patch improves MP3 detection. It is a bit more
> complicated, because it avoids seeking backwards as much as possible.
> Even with linear streams only as many frames as neccessary for reliable
> detection will be skipped.
> Please comment.
>
> Greetings,
> Reimar Döffinger
> Index: libmpdemux/demux_audio.c
> ===================================================================
> RCS file: /cvsroot/mplayer/main/libmpdemux/demux_audio.c,v
> retrieving revision 1.26
> diff -u -r1.26 demux_audio.c
> --- libmpdemux/demux_audio.c 12 Aug 2004 12:36:08 -0000 1.26
> +++ libmpdemux/demux_audio.c 5 Sep 2004 12:04:44 -0000
> @@ -27,17 +27,74 @@
> float last_pts;
> } da_priv_t;
>
> +typedef struct mp3_hdr {
> + int frame_pos;
> + int next_frame_pos;
> + int mp3_chans;
> + int mp3_freq;
> + int cons_hdrs;
> + struct mp3_hdr *next;
> +} mp3_hdr_t;
When it comes to defining file formats, I believe we should use
platform-independent inttypes, like int32_t. I know int is 32bit
on both ia32 and amd64, but I think we still should, as a good
practice. Besides, isn't mp3 header structure defined elsewhere?
R.
--
MPlayer RPMs maintainer: http://greysector.rangers.eu.org/mplayer/
"I am Grey. I stand between the candle and the star. We are Grey.
We stand between the darkness ... and the light."
-- Delenn in Grey Council in Babylon 5:"Babylon Squared"
More information about the MPlayer-dev-eng
mailing list