[FFmpeg-devel] [PATCH] skip ##ix chunks reading as video/audio data

Maksym Veremeyenko verem
Sun Nov 23 18:23:45 CET 2008


Michael Niedermayer ???????(??):
[...]
>> or 01ix :
>>
>> FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF 30 
>> 2146641244 805240575 100
>> FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF 30 31 2146641245 
>> 825229055 100
>> FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF 30 31 69 2146641246 1764831231 
>> 100
>> FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF 30 31 69 78 2146641247 2020159792 100
>> FFFFFFFF FFFFFFFF FFFFFFFF 30 31 69 78 38 2146641248 947415345 100
>> FFFFFFFF FFFFFFFF 30 31 69 78 38 FA 2146641249 -96962455 1
>> FFFFFFFF 30 31 69 78 38 FA 1 2146641250 33175672 100
>> 30 31 69 78 38 FA 1 0 2146641251 129592 100
>>                                         ^^^
> 
> what are these numbers supposed to be?
This is debug output log from avidec.c:
[...]
         n= get_stream_idx(d+2);
//av_log(NULL, AV_LOG_DEBUG, "%X %X %X %X %X %X %X %X %"PRId64" %d 
%d\n", d[0], d[1], d[2], d[3], d[4], d[5], d[6], d[7], i, size, n);
         if(i + size > avi->fsize || d[0]<0)
             continue;

         //parse ix##
         if(  (d[0] == 'i' && d[1] == 'x' && n < s->nb_streams)
         //parse JUNK
            ||(d[0] == 'J' && d[1] == 'U' && d[2] == 'N' && d[3] == 'K')
            ||(d[0] == 'i' && d[1] == 'd' && d[2] == 'x' && d[3] == '1')){
             url_fskip(pb, size);
//av_log(NULL, AV_LOG_DEBUG, "SKIP\n");
             goto resync;
[...]

it suppose to output chunk fourcc, stream id (n)

> 
> 
>> Is this patch OK?
> 
> NO, this is just wrong you are removing the stream validity check thus
> litterally breaking the demuxer.
This done in same manner as idx1 skip done for example, does is wrong 
to?....

In addition:

1) the assign:
[...]
         n= get_stream_idx(d+2);
[...]
some years ago was:
[...]
         n= (d[2] - '0') * 10 + (d[3] - '0');
[...]
That seems good for ix00 or ix01, but not for 01xx or 00ix.

2) if wrong stream detected by get_stream_idx it return 100, does it 
have a reason to check:
[...]
         if(  (  (d[0] == 'i' && d[1] == 'x' && n < s->nb_streams)
[...]
stream number for not to skip in a case of wrong stream?

I am not the author of original code, perhaps, am i missed something?

What is preferable way to stop reading index block as frame data?


-- 
________________________________________
Maksym Veremeyenko




More information about the ffmpeg-devel mailing list