Skip to content

Commit

Permalink
fix video decode.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mrs4s committed Jan 8, 2021
1 parent 9b232d2 commit 29f670b
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions message/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -397,14 +397,16 @@ func ParseMessageElems(elems []*msg.Elem) []IMessageElement {
}
}
if elem.VideoFile != nil {
return append(res, &ShortVideoElement{
Name: string(elem.VideoFile.FileName),
Uuid: elem.VideoFile.FileUuid,
Size: elem.VideoFile.GetFileSize(),
ThumbSize: elem.VideoFile.GetThumbFileSize(),
Md5: elem.VideoFile.FileMd5,
ThumbMd5: elem.VideoFile.GetThumbFileMd5(),
})
return []IMessageElement{
&ShortVideoElement{
Name: string(elem.VideoFile.FileName),
Uuid: elem.VideoFile.FileUuid,
Size: elem.VideoFile.GetFileSize(),
ThumbSize: elem.VideoFile.GetThumbFileSize(),
Md5: elem.VideoFile.FileMd5,
ThumbMd5: elem.VideoFile.GetThumbFileMd5(),
},
}
}
if elem.Text != nil {
if len(elem.Text.Attr6Buf) == 0 {
Expand Down

0 comments on commit 29f670b

Please sign in to comment.