aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/matroskaenc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2016-05-22 03:20:24 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2016-05-22 03:22:09 +0200
commit2062d51275bda642cfc72952ddef1b0efdde4c2d (patch)
tree09795e01be7caf9c57f2b673d4e0462634410112 /libavformat/matroskaenc.c
parent9d5894b2399e3b2ce9fe8ddb5a28db66affefe25 (diff)
downloadffmpeg-2062d51275bda642cfc72952ddef1b0efdde4c2d.tar.gz
avformat/matroskaenc: wrap par->format use as sample format under codec_type == AVMEDIA_TYPE_AUDI
Fixes CID1361946 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/matroskaenc.c')
-rw-r--r--libavformat/matroskaenc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index 4cd987824b..e1e02a11a7 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -947,6 +947,7 @@ static int mkv_write_track(AVFormatContext *s, MatroskaMuxContext *mkv,
return 0;
}
+ if (par->codec_type == AVMEDIA_TYPE_AUDIO) {
if (!bit_depth && par->codec_id != AV_CODEC_ID_ADPCM_G726) {
if (par->bits_per_raw_sample)
bit_depth = par->bits_per_raw_sample;
@@ -955,6 +956,7 @@ static int mkv_write_track(AVFormatContext *s, MatroskaMuxContext *mkv,
}
if (!bit_depth)
bit_depth = par->bits_per_coded_sample;
+ }
if (par->codec_id == AV_CODEC_ID_AAC) {
ret = get_aac_sample_rates(s, par, &sample_rate, &output_sample_rate);