[Ffmpeg-devel] [PATCH] allow ffmpeg to read mp3s beginning with partial frames
Michael Niedermayer
michaelni
Sat Sep 9 01:23:10 CEST 2006
Hi
On Sat, Sep 09, 2006 at 12:06:43AM +0100, Victor Voros wrote:
>
> Updated patch as per suggestions...
[...]
> > >
> > > I believe the false positive issue can be resolved with
> > >
> > > -if (mp3_is_frame_header(p->buf+d)) return AVPROBE_SCORE_MAX;
> > > +if (ff_mpa_check_header(p->buf+d/*or however its called*/)) return
> > > d==0?AVPROBE_SCORE_MAX:SOME_SMALL_NON_ZERO_NUMBER;
> >
> > yes
> >
> >
>
> Now utilises ff_mpa_check_header and returns 1 (safest to match if
> nothing else does)
>
> [snip ffmpeg doesn't handle it if av_probe changed w/o av_init_header]
>
> > yes thats why i am so much against doing it in lavf/mp3.c, it belongs
> > to the mp3 parser (libavcodec/parser.c)
> >
> >
>
> Turns out im wrong it does. libavcodec/parser.c handles initial partial
> frame and files work fine with just the change to mp3_read_probe as
> supplied.
patch looks ok
note to whoever applies it: run it through dos2unix before doing so
[...]
--
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