[FFmpeg-devel] [PATCH] non-interleaved AVI read packet fix

Maksym Veremeyenko verem
Thu Sep 3 07:27:07 CEST 2009


Michael Niedermayer ???????(??):
> On Wed, Sep 02, 2009 at 09:22:42AM +0300, Maksym Veremeyenko wrote:
[...]
>> 0d8d919f05a37634591c4b04bf29f0db95fef958  avidec_non_interleaved_read_packet_fix_v3.patch
>> Index: libavformat/avidec.c
>> ===================================================================
>> --- libavformat/avidec.c	(revision 19698)
>> +++ libavformat/avidec.c	(working copy)
>> @@ -682,6 +682,12 @@
>>  
>>              if(ast->sample_size)
>>                  ts /= ast->sample_size;
>> +
>> +            /* skip finished stream */
>> +            if(!ast->remaining)
>> +                if(av_index_search_timestamp(st, ts, AVSEEK_FLAG_ANY) < 0)
>> +                    continue;
>> +
> 
> you dont need a av_index_search_timestamp() call to test the last index entry

Another way is to check ast->frame_offset against last index item timestamp.

Newer patch attached.

-- 
________________________________________
Maksym Veremeyenko
-------------- next part --------------
A non-text attachment was scrubbed...
Name: avidec_non_interleaved_read_packet_fix_v4.patch
Type: text/x-patch
Size: 686 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090903/7aa56cde/attachment.bin>



More information about the ffmpeg-devel mailing list