[FFmpeg-cvslog] VC1testenc: convert pts values to correct time-base.
Baptiste Coudurier
baptiste.coudurier
Sat Jan 29 12:47:49 CET 2011
On 1/29/11 3:01 AM, Reimar D?ffinger wrote:
> ffmpeg | branch: master | Reimar D?ffinger <Reimar.Doeffinger at gmx.de> | Sat Jan 29 11:56:25 2011 +0100| [76c802e989b61423c1554cf204f96f70b3edb145] | committer: Reimar D?ffinger
>
> VC1testenc: convert pts values to correct time-base.
>
> VC1 test container always uses time-base 1 ms, so we must convert
> from whatever time-base the application gave us to that, otherwise
> the video will play at ridiculous speeds.
> It would be possible to signal that a container supports only one
> time-base and have code in a layer above do the conversion, but
> for a single format this seems over-engineered.
>
>> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=76c802e989b61423c1554cf204f96f70b3edb145
> ---
>
> libavformat/vc1testenc.c | 5 ++++-
> 1 files changed, 4 insertions(+), 1 deletions(-)
>
> diff --git a/libavformat/vc1testenc.c b/libavformat/vc1testenc.c
> index 507b332..06431da 100644
> --- a/libavformat/vc1testenc.c
> +++ b/libavformat/vc1testenc.c
> @@ -55,11 +55,14 @@ static int vc1test_write_packet(AVFormatContext *s, AVPacket *pkt)
> {
> RCVContext *ctx = s->priv_data;
> ByteIOContext *pb = s->pb;
> + uint32_t pts = av_rescale(pkt->pts,
> + 1000 * (uint64_t)s->streams[0]->time_base.num,
> + s->streams[0]->time_base.den);
This should not be needed if av_set_pts_info is correctly used in
write_header.
--
Baptiste COUDURIER
Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
FFmpeg maintainer http://www.ffmpeg.org
More information about the ffmpeg-cvslog
mailing list