[FFmpeg-devel] [PATCH] fix support for (broken) libnut files in nut?demuxer

Michael Niedermayer michaelni
Sun Aug 10 01:19:56 CEST 2008


On Sat, Aug 09, 2008 at 02:17:44PM +0000, Oded Shimon wrote:
> John Koleszar <john.koleszar <at> on2.com> writes:
> > I know that the bitstreams produced by libnut aren't compliant with the
> > frozen spec atm, but the lavf native demuxer appears to want to support
> > them (otherwise why not parse header_count_minus1 unconditionally), so
> > this patch attempts to fix that. /disclaimer
> > 
> > If header_count_minus1 is not coded in the header, header_count is not
> > set, leading to the "header_idx invalid" assertion being tripped later.
> > The attached patch defaults it. OTOH if you want to keep the existing
> > semantics of header_count==0 indicating the count was not coded, the
> > obvious alternative is
> > 
> > @@ -703,1 +703,1 @@
> > -    if(*header_idx >= (unsigned)nut->header_count){
> > +    if(nut->header_count && *header_idx >= (unsigned)nut->header_count){
> > 
> > John
> 
> I committed a fix to libnut to put dummy (correct) values for header_count and
> main_flags. It would probably be best to fix lavf now to always expect the
> value, and not support it not existing.

i disagree, we should try to support old files whenever possible

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Breaking DRM is a little like attempting to break through a door even
though the window is wide open and the only thing in the house is a bunch
of things you dont want and which you would get tomorrow for free anyway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080810/0c0bbebc/attachment.pgp>



More information about the ffmpeg-devel mailing list