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

Maksym Veremeyenko verem
Thu Sep 3 15:58:07 CEST 2009


Michael Niedermayer ???????(??):
> On Thu, Sep 03, 2009 at 08:27:07AM +0300, Maksym Veremeyenko wrote:
>> Michael Niedermayer ???????(??):
>>> On Wed, Sep 02, 2009 at 09:22:42AM +0300, Maksym Veremeyenko wrote:
[...]
>> +            /* skip finished stream */
>> +            if(!ast->remaining && st->nb_index_entries &&
>> +               ts > st->index_entries[st->nb_index_entries - 1].timestamp *
>> +                    FFMAX(1, ast->sample_size))
>> +                continue;
>> +
> 
> the st->nb_index_entries check can be factored with the surrounding code,
> the whole does nothing if its 0
> the * ast->sample_size could possibly be avoided by inserting the if at a
> differnt spot
> 
> what remains could be written like
> 
> last_ts= st->index_entries[st->nb_index_entries - 1].timestamp;
> if(!ast->remaining && ts > last_ts)
>     continue;

sure, that much simpler...

your version patch attached.

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



More information about the ffmpeg-devel mailing list