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

John Koleszar john.koleszar
Sat Aug 9 14:48:22 CEST 2008

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){


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: nut_header_count_default.diff
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080809/5c37e3cf/attachment.asc>

More information about the ffmpeg-devel mailing list