]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/matroskaenc.c
aacpsy: remove dead code
[ffmpeg] / libavformat / matroskaenc.c
index 4cd987824b24635329f5e43497f2d9ae86399a46..6252de88be6ddd3a049b00a4c9d6510dc5774bad 100644 (file)
@@ -947,14 +947,16 @@ static int mkv_write_track(AVFormatContext *s, MatroskaMuxContext *mkv,
         return 0;
     }
 
-    if (!bit_depth && par->codec_id != AV_CODEC_ID_ADPCM_G726) {
-        if (par->bits_per_raw_sample)
-            bit_depth = par->bits_per_raw_sample;
-        else
-            bit_depth = av_get_bytes_per_sample(par->format) << 3;
+    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;
+            else
+                bit_depth = av_get_bytes_per_sample(par->format) << 3;
+        }
+        if (!bit_depth)
+            bit_depth = par->bits_per_coded_sample;
     }
-    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);