fix: add type switch for bitrate

This commit is contained in:
Derrick Hammer 2024-03-01 03:15:12 -05:00
parent 40f9ec7cac
commit d52e20c0e1
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 6 additions and 1 deletions

View File

@ -101,7 +101,12 @@ func (mmd *MediaFormat) DecodeMsgpack(dec *msgpack.Decoder) error {
case 14:
mmd.Fps = value.(int)
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:
mmd.AudioChannels = int(value.(int8))
case 19: