Fixed FLV::Tag.offset() return value for non-H264 packets.
This commit is contained in:
parent
bdc4b194df
commit
330b9f871d
1 changed files with 5 additions and 1 deletions
|
@ -265,7 +265,11 @@ std::string FLV::Tag::tagType(){
|
|||
/// Returns the 24-bit offset of this tag.
|
||||
/// Returns 0 if the tag isn't H264
|
||||
int FLV::Tag::offset(){
|
||||
if ((data[11] & 0x0F) == 7){
|
||||
return (((data[13] << 16) + (data[14] << 8) + data[15]) << 8) >> 8;
|
||||
}else{
|
||||
return 0;
|
||||
}
|
||||
} //offset getter
|
||||
|
||||
/// Sets the 24-bit offset of this tag.
|
||||
|
|
Loading…
Add table
Reference in a new issue