[FFmpeg-cvslog] r20199 - trunk/libavcodec/libtheoraenc.c

reimar subversion
Sat Oct 10 16:43:31 CEST 2009


Author: reimar
Date: Sat Oct 10 16:43:31 2009
New Revision: 20199

Log:
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.

Modified:
   trunk/libavcodec/libtheoraenc.c

Modified: trunk/libavcodec/libtheoraenc.c
==============================================================================
--- trunk/libavcodec/libtheoraenc.c	Sat Oct 10 12:40:36 2009	(r20198)
+++ trunk/libavcodec/libtheoraenc.c	Sat Oct 10 16:43:31 2009	(r20199)
@@ -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;
 }
 



More information about the ffmpeg-cvslog mailing list