[FFmpeg-devel] [PATCH] H.264 timestamps in h264_parser - complete set

Ivan Schreter schreter
Thu Feb 19 23:31:13 CET 2009

Ivan Schreter wrote:
> Michael Niedermayer wrote:
>> On Thu, Feb 19, 2009 at 06:23:41PM +0100, Ivan Schreter wrote:
>>> Michael Niedermayer wrote:
>>>     [...]
>>>> i would prefer if convergence_duration in AVCodecParserContext where
>>>> defined the same way as in AVPacket, its a source of confusion 
>>>> otherwise
>>> I copied the docs from AVPacket changing timestamp to frame count. 
>>> Namely, it can't be quite the same, the codec doesn't necessarily 
>>> have to know the duration of one frame. So it can't be timestamp, 
>>> only frame count.
>> there is no reason why a codec couldnt store the timestamp and not the
>> frame count
> Ah, I missed this one when replying to your mail.
> Attached is a modified patch, which makes the codec responsible for 
> setting convergence_duration to proper value in stream time units, so 
> it should be OK now.
> However, I'm not 100% sure, if it will work this way. For H.264, we 
> have 90kHz clock, at least for MPEG-TS. But how about other formats? 
> Are they forced to use 90kHz as well? If not, how does the codec know 
> what time base the stream has? It may not depend on AVStream, right? 
> Otherwise, we'd have a circular dependency between lavf and lavc.
Sorry, one more update. I spotted a warning when compiling updated code. 
I forgot to change the type to int64_t. Fixed in attached patch.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: avcodec_convdur.patch
Type: text/x-patch
Size: 2750 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090219/76baae9b/attachment.bin>

More information about the ffmpeg-devel mailing list