mirror of
https://github.com/alexkay/spek.git
synced 2026-11-22 03:06:44 +03:00
Fix sample rate of DTS files
This commit is contained in:
1 parent
41a1b70aa4
commit
58517e72be
1 file changed
+14
-5
+14
-5
@@ -94,12 +94,21 @@ namespace Spek {
|
||||
var caps = pad.get_caps ();
|
||||
for (int i = 0; i < caps.get_size (); i++) {
|
||||
var structure = caps.get_structure (i);
|
||||
int n = 0;
|
||||
if (rate == 0 && structure.get_int ("rate", out n)) {
|
||||
rate = n;
|
||||
Gst.Value? val;
|
||||
int n;
|
||||
if (rate == 0 && (val = structure.get_value ("rate")) != null) {
|
||||
if (val.type () == typeof (int)) {
|
||||
rate = val.get_int ();
|
||||
} else if (val.type () == typeof (IntRange)) {
|
||||
rate = val.get_int_range_max ();
|
||||
}
|
||||
}
|
||||
if (channels == 0 && structure.get_int ("channels", out n)) {
|
||||
channels = n;
|
||||
if (channels == 0 && (val = structure.get_value ("channels")) != null) {
|
||||
if (val.type () == typeof (int)) {
|
||||
channels = val.get_int ();
|
||||
} else if (val.type () == typeof (IntRange)) {
|
||||
channels = val.get_int_range_max ();
|
||||
}
|
||||
}
|
||||
if (depth == 0 && structure.get_int ("depth", out n)) {
|
||||
depth = n;
|
||||
|
||||
Reference in new issue
Block a user