changeset 2493:61bc7a789851 libavformat

Use sample format for bit depth if av_get_bits_per_sample() doesn't give one
author conrad
date Wed, 05 Sep 2007 00:25:14 +0000
parents cdd7d0f4d93c
children 7dfbd8e0502f
files matroskaenc.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/matroskaenc.c	Wed Sep 05 00:25:07 2007 +0000
+++ b/matroskaenc.c	Wed Sep 05 00:25:14 2007 +0000
@@ -498,6 +498,9 @@
         int sample_rate = codec->sample_rate;
         int output_sample_rate = 0;
 
+        if (!bit_depth)
+            bit_depth = av_get_bits_per_sample_format(codec->sample_fmt);
+
         if (codec->codec_id == CODEC_ID_AAC)
             get_aac_sample_rates(codec, &sample_rate, &output_sample_rate);