[Ffmpeg-devel] bug in mp3-decoding on x86-64

Michael Niedermayer michaelni
Wed Oct 11 12:08:17 CEST 2006


Hi

On Wed, Oct 11, 2006 at 11:37:50AM +0200, Tomas Groth wrote:
> 
> --- Michael Niedermayer <michaelni at gmx.at> skrev:
> 
> > Hi
> > 
> > On Wed, Oct 11, 2006 at 10:32:06AM +0200, Tomas Groth wrote:
> > > Hi,
> > > 
> > > I'm a gnash (gnu's flash decoder) developer, and are using libavcodec as a
> > > mp3-decoder, but has hit a bug in current SVN... It work fine except for on
> > > x86_64 where it prints alot of errors, like this:
> > > 
> > > [mp3 @ 0x2b8912b01250]header missing skiping one byte
> > > [mp3 @ 0x2b8912b01250]header missing skiping one byte
> > > [mp3 @ 0x2b8912b01250]incomplete frame
> > > 
> > > I played around a bit with SVN, and tracked the error down to somewhere
> > between
> > > revision 6084 - 6101 (before 6084 it works, after 6101 it doesn't). If you
> > wish
> > 
> > do you pass complete frames to libavcodec? if no then it wont work, you
> > must split the bitstream into frames, just run the bitstream through an
> > AVParser, the old mp3 decoder in libavcodec simply contained a duplicated
> > AVParser like thing
> > 
> 
> That's probably it! Does this mean I have to run the stream through
> libavformat?

while running it through libavformat will work too, its not needed
you just need to run the stream through libavcodec/parser.c with something
like:

myparser= av_parser_init(AVCodecContext->codec_id); (once)

while(in_len){
    len = av_parser_parse(myparser, AVCodecContext, &data, &size,
                                        in_data, in_len,
                                        pts, dts);
    in_data += len;
    in_len  -= len;

    decode_frame(data, size);
}

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In the past you could go to a library and read, borrow or copy any book
Today you'd get arrested for mere telling someone where the library is




More information about the ffmpeg-devel mailing list