summaryrefslogtreecommitdiffstats
path: root/audio/decode/ad_lavc.c
diff options
context:
space:
mode:
authorMarcoen Hirschberg <m.hirschberg@activevideo.com>2014-05-26 20:16:40 +0200
committerwm4 <wm4@nowhere>2014-05-28 21:37:44 +0200
commit6e58b20cced05c303f1b35d5baa5f79b8ad612f5 (patch)
tree1010851871a329115500d70272cf35d1ebc961e7 /audio/decode/ad_lavc.c
parentb442b522f6d7064caaacc52021f7020b4ad4d261 (diff)
downloadmpv-6e58b20cced05c303f1b35d5baa5f79b8ad612f5.tar.bz2
mpv-6e58b20cced05c303f1b35d5baa5f79b8ad612f5.tar.xz
audio: change values from bytes-per-second to bits-per-second
The i_bps members of the sh_audio and dev_video structs are mostly used for displaying the average audio and video bitrates. Keeping them in bits-per-second avoids truncating them to bytes-per-second and changing them back lateron.
Diffstat (limited to 'audio/decode/ad_lavc.c')
-rw-r--r--audio/decode/ad_lavc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/audio/decode/ad_lavc.c b/audio/decode/ad_lavc.c
index 802683bf7b..b013400cab 100644
--- a/audio/decode/ad_lavc.c
+++ b/audio/decode/ad_lavc.c
@@ -229,7 +229,7 @@ static int init(struct dec_audio *da, const char *decoder)
lavc_context->codec_tag = sh->format;
lavc_context->sample_rate = sh_audio->samplerate;
- lavc_context->bit_rate = sh_audio->i_bps * 8;
+ lavc_context->bit_rate = sh_audio->i_bps;
lavc_context->channel_layout = mp_chmap_to_lavc(&sh_audio->channels);
if (sh_audio->wf)
@@ -270,9 +270,9 @@ static int init(struct dec_audio *da, const char *decoder)
}
}
- da->i_bps = lavc_context->bit_rate / 8;
+ da->i_bps = lavc_context->bit_rate;
if (sh_audio->wf && sh_audio->wf->nAvgBytesPerSec)
- da->i_bps = sh_audio->wf->nAvgBytesPerSec;
+ da->i_bps = sh_audio->wf->nAvgBytesPerSec * 8;
return 1;
}