Browse Source

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
tags/v0.6
Reimar Döffinger 16 years ago
parent
commit
3bb984987c
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      libavcodec/libtheoraenc.c

+ 3
- 0
libavcodec/libtheoraenc.c View File

@@ -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;
}



Loading…
Cancel
Save