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

Oded Shimon ods15
Sat Aug 9 16:17:44 CEST 2008


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.

- ods15





More information about the ffmpeg-devel mailing list