[FFmpeg-devel] [PATCH] Decoding of raw UTF-8 text from Ogg streams

David Conrad lessen42
Tue Jul 28 19:25:57 CEST 2009


On Jul 28, 2009, at 12:56 PM, ogg.k.ogg.k at googlemail.com wrote:

>> Indeed, but I'm hitting a wall here: I need to get the time base to  
>> convert
>> from whatever scale pts is in to milliseconds. I don't see how I  
>> can access
>> the AVStream from the decoder, however. Any pointer on how to  
>> retrieve
>> that time base info ?
>
> I've found one way to carry this info, but I've no idea if that'd  
> introduce
> problems elsewhere. I don't know how this all works, so would this  
> change
> work (for Matroska only, obviously) ? It initializes the codec time  
> base (which
> I can access from libavcodec). Note that that timebase is also  
> modified a
> bit later, and I don't know what this does.
> With this, I get the correct time base in ssadec.c (I get 0/1  
> otherwise).

In theory, default duration should never be set for subtitles in mkv.  
But it could be, and if it were it would overwrite this with a  
meaningless value.

At any rate, I think putting this in av_find_stream_info is better,  
perhaps unconditionally for all subtitles since they have to convert  
an AVPacket pts to milliseconds.



More information about the ffmpeg-devel mailing list