]> granicus.if.org Git - handbrake/commitdiff
libhb: Append input bitrate to end of audio source description. Closes #1718.
authorAndrew Brezovsky <abrezovsky@gmail.com>
Thu, 7 Feb 2019 04:47:24 +0000 (23:47 -0500)
committerBradley Sepos <bradley@bradleysepos.com>
Fri, 8 Feb 2019 22:35:16 +0000 (17:35 -0500)
Signed-off-by: Andrew Brezovsky <abrezovsky@gmail.com>
libhb/scan.c

index b034acc886171b29d8e199a5f1f0e43dc6c62c0b..5d97b27d18231ca51e086453a5df4a901afcb855 100644 (file)
@@ -1376,6 +1376,12 @@ static void LookForAudio(hb_scan_t *scan, hb_title_t * title, hb_buffer_t * b)
         }
     }
 
+    // Append input bitrate in kbps to the end of the description
+    char in_bitrate_str[19];
+    snprintf(in_bitrate_str, 18, " (%d kbps)", audio->config.in.bitrate / 1000);
+    strncat(audio->config.lang.description, in_bitrate_str, 
+            sizeof(audio->config.lang.description) - strlen(audio->config.lang.description) - 1);
+
     hb_log( "scan: audio 0x%x: %s, rate=%dHz, bitrate=%d %s", audio->id,
             info.name, audio->config.in.samplerate, audio->config.in.bitrate,
             audio->config.lang.description );