[FFmpeg-cvslog] matroskadec: set default duration for simple block

Michael Niedermayer michaelni at gmx.at
Fri Mar 25 12:05:29 CET 2011


On Thu, Mar 24, 2011 at 08:09:09PM -0700, John Stebbins wrote:
> On 03/24/2011 07:13 PM, John Stebbins wrote:
>> ffmpeg | branch: master | John Stebbins<stebbins at jetheaddev.com>  | Fri Mar 25 00:34:18 2011 +0100| [98a7d560b4f835ba5b99b9974ee1a2c096198bea] | committer: Luca Barbato
>>
>> matroskadec: set default duration for simple block
>>
>> When a normal Block is parsed, duration is initialized to
>> AV_NOPTS_VALUE.  If it is not changed, then the track's default
>> duration is used.  But for SimpleBlock, duration is initialized to
>> 0 instead of AV_NOPTS_VALUE.  This is due to the difference in how
>> EBML_NEST vs EBML_PASS are processed.  Setting duration to 0 leads
>> eventually to wrongly estimate the frame duration in util.c
>>
>> Signed-off-by: Luca Barbato<lu_zero at gentoo.org>
>>
>>> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=98a7d560b4f835ba5b99b9974ee1a2c096198bea
>> ---
>>
>>   libavformat/matroskadec.c |    2 ++
>>   1 files changed, 2 insertions(+), 0 deletions(-)
>>
>> diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
>> index 828d578..61a77ab 100644
>> --- a/libavformat/matroskadec.c
>> +++ b/libavformat/matroskadec.c
>> @@ -1852,6 +1852,8 @@ static int matroska_parse_cluster(MatroskaDemuxContext *matroska)
>>       for (i=0; i<blocks_list->nb_elem; i++)
>>           if (blocks[i].bin.size>  0&&  blocks[i].bin.data) {
>>               int is_keyframe = blocks[i].non_simple ? !blocks[i].reference : -1;
>> +            if (!blocks[i].non_simple)
>> +                blocks[i].duration = AV_NOPTS_VALUE;
>>               res=matroska_parse_block(matroska,
>>                                        blocks[i].bin.data, blocks[i].bin.size,
>>                                        blocks[i].bin.pos,  cluster.timecode,
>>
>
> This conflicts with an earlier patch that was intended to fix the same  
> thing.
>
> http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=6f1260f87061bdf7a8ff2472e309d9635e5d770d
>
> The combination isn't going to work right. Aurel modified the original  
> patch I submitted and committed it.

thanks, ive reverted yours

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

DNS cache poisoning attacks, popular search engine, Google internet authority
dont be evil, please
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-cvslog/attachments/20110325/da95de0f/attachment.asc>


More information about the ffmpeg-cvslog mailing list