From 3bb984987ccfb877a30d2e2daceb1f4c0a618178 Mon Sep 17 00:00:00 2001 From: Reimar Döffinger Date: Sat, 10 Oct 2009 14:43:31 +0000 Subject: Hack: set the coded frame PTS to the incoming PTS. This is not correct, but libtheora does not seem to provide a way to get the correct value, and this is necessary to make encoding produce sensible time stamps when encoded content is variable FPS or the time base is simply different from FPS. Somewhat fixes issue 1197. Originally committed as revision 20199 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/libtheoraenc.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libavcodec/libtheoraenc.c') diff --git a/libavcodec/libtheoraenc.c b/libavcodec/libtheoraenc.c index f0285956da..fb05e5a3d1 100644 --- a/libavcodec/libtheoraenc.c +++ b/libavcodec/libtheoraenc.c @@ -250,6 +250,9 @@ static int encode_frame( } memcpy(outbuf, o_packet.packet, o_packet.bytes); + // HACK: does not take codec delay into account (neither does the decoder though) + avc_context->coded_frame->pts= frame->pts; + return o_packet.bytes; } -- cgit v1.2.3