Commit 956ab9af authored by diego's avatar diego

Add a comment about swapped numerator and denominator.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@7871 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 016d455e
...@@ -92,6 +92,8 @@ static int encode_init(AVCodecContext* avc_context) ...@@ -92,6 +92,8 @@ static int encode_init(AVCodecContext* avc_context)
t_info.frame_height = avc_context->height; t_info.frame_height = avc_context->height;
t_info.offset_x = 0; t_info.offset_x = 0;
t_info.offset_y = 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_numerator = avc_context->time_base.den;
t_info.fps_denominator = avc_context->time_base.num; t_info.fps_denominator = avc_context->time_base.num;
if (avc_context->sample_aspect_ratio.num != 0) { if (avc_context->sample_aspect_ratio.num != 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment