changeset 10381:9262948fd649 libavcodec

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.
author reimar
date Sat, 10 Oct 2009 14:43:31 +0000
parents 464ea00ac79e
children d4d925400ba2
files libtheoraenc.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libtheoraenc.c	Sat Oct 10 08:49:57 2009 +0000
+++ b/libtheoraenc.c	Sat Oct 10 14:43:31 2009 +0000
@@ -250,6 +250,9 @@
     }
     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;
 }