fix: add type switch for bitrate
This commit is contained in:
parent
40f9ec7cac
commit
d52e20c0e1
|
@ -101,7 +101,12 @@ func (mmd *MediaFormat) DecodeMsgpack(dec *msgpack.Decoder) error {
|
||||||
case 14:
|
case 14:
|
||||||
mmd.Fps = value.(int)
|
mmd.Fps = value.(int)
|
||||||
case 15:
|
case 15:
|
||||||
mmd.Bitrate = int(value.(uint16))
|
switch value.(type) {
|
||||||
|
case uint16:
|
||||||
|
mmd.Bitrate = int(value.(uint16))
|
||||||
|
case uint32:
|
||||||
|
mmd.Bitrate = int(value.(uint32))
|
||||||
|
}
|
||||||
case 18:
|
case 18:
|
||||||
mmd.AudioChannels = int(value.(int8))
|
mmd.AudioChannels = int(value.(int8))
|
||||||
case 19:
|
case 19:
|
||||||
|
|
Loading…
Reference in New Issue