aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/matroskaenc.c
diff options
context:
space:
mode:
authorDavid Conrad <lessen42@gmail.com>2007-09-05 00:25:14 +0000
committerDavid Conrad <lessen42@gmail.com>2007-09-05 00:25:14 +0000
commita6da1aa057cb78d99036e72ee6283b51382b8b33 (patch)
treefd33f12e868ba109a582901c6db849d02e99df00 /libavformat/matroskaenc.c
parent8eb1915395eb8f88d67a6d70a23eaeea35e0969a (diff)
downloadffmpeg-a6da1aa057cb78d99036e72ee6283b51382b8b33.tar.gz
Use sample format for bit depth if av_get_bits_per_sample() doesn't give one
Originally committed as revision 10362 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/matroskaenc.c')
-rw-r--r--libavformat/matroskaenc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index 294f98f257..c1d591f734 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -498,6 +498,9 @@ static int mkv_write_tracks(AVFormatContext *s)
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);