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

Michael Niedermayer michaelni
Sat Aug 9 18:47:44 CEST 2008


On Sat, Aug 09, 2008 at 08:48:22AM -0400, John Koleszar wrote:
> 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
[...]
> Index: ../ffmpeg/libavformat/nutdec.c
> ===================================================================
> --- ../ffmpeg/libavformat/nutdec.c	(revision 14661)
> +++ ../ffmpeg/libavformat/nutdec.c	(working copy)
> @@ -259,6 +259,7 @@
>      }
>      assert(nut->frame_code['N'].flags == FLAG_INVALID);
>  
> +    nut->header_count = 1;
>      if(end > url_ftell(bc) + 4){
>          int rem= 1024;
>          GET_V(nut->header_count, tmp<128U)

ok

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Concerning the gods, I have no means of knowing whether they exist or not
or of what sort they may be, because of the obscurity of the subject, and
the brevity of human life -- Protagoras
-------------- 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/20080809/9a6e7af9/attachment.pgp>



More information about the ffmpeg-devel mailing list