Mercurial > libavcodec.hg
comparison libtheoraenc.c @ 4496:a02a0d06e99b libavcodec
Add a comment about swapped numerator and denominator.
author | diego |
---|---|
date | Wed, 07 Feb 2007 14:10:50 +0000 |
parents | 432d332b7def |
children | bff60ecc02f9 |
comparison
equal
deleted
inserted
replaced
4495:2a51d7c4820b | 4496:a02a0d06e99b |
---|---|
90 t_info.height = avc_context->height; | 90 t_info.height = avc_context->height; |
91 t_info.frame_width = avc_context->width; | 91 t_info.frame_width = avc_context->width; |
92 t_info.frame_height = avc_context->height; | 92 t_info.frame_height = avc_context->height; |
93 t_info.offset_x = 0; | 93 t_info.offset_x = 0; |
94 t_info.offset_y = 0; | 94 t_info.offset_y = 0; |
95 /* Swap numerator and denominator as time_base in AVCodecContext gives the | |
96 * time period between frames, but theora_info needs the framerate. */ | |
95 t_info.fps_numerator = avc_context->time_base.den; | 97 t_info.fps_numerator = avc_context->time_base.den; |
96 t_info.fps_denominator = avc_context->time_base.num; | 98 t_info.fps_denominator = avc_context->time_base.num; |
97 if (avc_context->sample_aspect_ratio.num != 0) { | 99 if (avc_context->sample_aspect_ratio.num != 0) { |
98 t_info.aspect_numerator = avc_context->sample_aspect_ratio.num; | 100 t_info.aspect_numerator = avc_context->sample_aspect_ratio.num; |
99 t_info.aspect_denominator = avc_context->sample_aspect_ratio.den; | 101 t_info.aspect_denominator = avc_context->sample_aspect_ratio.den; |