diff --git a/libavcodec/libtheoraenc.c b/libavcodec/libtheoraenc.c
index f0285956dade63aa1f61b7a16ecdda621806e846..fb05e5a3d13d19ba73697e1a95d7495646a98e56 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;
 }