[Ffmpeg-devel] Re: [theora-dev] FFmpeg Theora encoding patch
Diego Biurrun
diego
Mon Feb 5 10:59:47 CET 2007
On Thu, Feb 01, 2007 at 09:09:46AM +0000, Paul Richards wrote:
> In AVCodecContext the time_base gives the time period between frames.
> In theora_info they want the frame rate.. These are the inverse of
> each other. :)
>
> I perhaps should have put a little comment there.
Like this?
--- libavcodec/libtheoraenc.c (revision 7773)
+++ libavcodec/libtheoraenc.c (working copy)
@@ -92,6 +92,8 @@
t_info.frame_height = avc_context->height;
t_info.offset_x = 0;
t_info.offset_y = 0;
+ /* Swap numerator and denominator as time_base in AVCodecContext gives the
+ * time period between frames, but theora_info needs the framerate. */
t_info.fps_numerator = avc_context->time_base.den;
t_info.fps_denominator = avc_context->time_base.num;
if (avc_context->sample_aspect_ratio.num != 0) {
Diego
More information about the ffmpeg-devel
mailing list