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

Michael Niedermayer michaelni
Thu Sep 3 17:17:29 CEST 2009


On Thu, Sep 03, 2009 at 04:58:07PM +0300, Maksym Veremeyenko wrote:
> 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.

the  st->nb_index_entries check has to be factored out first or this can
crash i think

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Concerning the gods, I have no means of knowing whether they exist or not
or of what sort they may be, because of the obscurity of the subject, and
the brevity of human life -- Protagoras
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090903/663e8ac6/attachment.pgp>



More information about the ffmpeg-devel mailing list