[Ffmpeg-devel] [PATCH] allow ffmpeg to read mp3s beginning with partial frames

Victor Voros Victor.Voros
Sat Sep 9 01:06:43 CEST 2006


Updated patch as per suggestions...

> Hi
> 
> On Fri, Sep 08, 2006 at 09:59:30AM +0100, Victor Voros wrote:
> > Michael - thank you for the feedback. I will post a revised patch
today
> > or tomorrow with the suggestions. I assume you're in agreement with
the
> > cosmetic changes. (constants bad!). 
> 
> yes, ive no objections to replacing 1234 constants by named constants
like 
> FOOBAR but that should ideally be a seperate patch

Taken cosmetic out as mp3_init_read doesn't need to be changed moreover
id3_parser is worse! Ideally id3 should be struct based, however a bit
too
much effort for something that is actually working 

> > 
> > 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. 

Ps this is the only e-mail I can use 24x7 for complicated reasons. Sorry
about the s**t at the bottom obviously auto-gened - will try and find
alternative


------------------------------------------------------------------------------
This e-mail and its contents are intended for the use of the addressee(s) and may be confidential/privileged. No-one else may review, copy, disclose or otherwise use it or its contents. If you receive this e-mail in error, please contact the originator and delete it as soon as possible.
Benfield Limited is authorised by the Financial Services Authority under the reference number 311884. Registered in England no 1170753. Registered office 55 Bishopsgate.

Please refer to Benfield Limited's terms and conditions (www.benfieldgroup.com/terms) for a description of our services, duties and points of contact. Please review these terms and conditions at inception and renewal of all reinsurance and insurance contracts.  

Please note that our terms and conditions and interests in other companies may change over time and these changes will be reflected on the Benfield Limited website. The latest version of our terms and conditions supersedes all previous versions.
==============================================================================
-------------- next part --------------
A non-text attachment was scrubbed...
Name: differences
Type: application/octet-stream
Size: 1650 bytes
Desc: differences
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20060909/cb79f7ff/attachment.obj>



More information about the ffmpeg-devel mailing list