Lines 563-574
Link Here
|
563 |
ogmrip_container_get_audio_overhead (OGMRipContainer *container, OGMRipContainerChild *child) |
563 |
ogmrip_container_get_audio_overhead (OGMRipContainer *container, OGMRipContainerChild *child) |
564 |
{ |
564 |
{ |
565 |
glong length; |
565 |
glong length; |
566 |
gint samples_per_frame, bitrate = 0; |
566 |
gint samples_per_frame, sample_rate; |
|
|
567 |
guint numerator, denominator; |
567 |
|
568 |
|
568 |
length = ogmrip_codec_get_length (child->codec, NULL); |
569 |
length = ogmrip_codec_get_length (child->codec, NULL); |
|
|
570 |
sample_rate = ogmrip_audio_get_sample_rate (OGMRIP_AUDIO (child->codec)); |
569 |
samples_per_frame = ogmrip_audio_get_samples_per_frame (OGMRIP_AUDIO (child->codec)); |
571 |
samples_per_frame = ogmrip_audio_get_samples_per_frame (OGMRIP_AUDIO (child->codec)); |
|
|
572 |
ogmrip_codec_get_framerate (OGMRIP_CODEC (child->codec), &numerator, &denominator); |
570 |
|
573 |
|
571 |
return (gint64) length * bitrate * container->priv->overhead / (gdouble) samples_per_frame; |
574 |
return (gint64) length * sample_rate * denominator * container->priv->overhead / (gdouble) (samples_per_frame * numerator); |
572 |
} |
575 |
} |
573 |
|
576 |
|
574 |
static gint64 |
577 |
static gint64 |