Skip to content

Commit

Permalink
Fixing YUV420p example issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ross-newman committed May 21, 2024
1 parent eb38e0f commit f596fa3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/wrappers/rtp_sap_wrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class RtpSapTransmit {
/// \return vector<uint8_t>&
///
std::vector<uint8_t>& GetBuffer() {
data_buffer_.resize(stream_info_.height * stream_info_.width * (BitsPerPixel(stream_info_.encoding) / (double)8));
data_buffer_.resize(stream_info_.height * stream_info_.width * (BitsPerPixel(stream_info_.encoding) / 8.0));
return data_buffer_;
}

Expand All @@ -74,7 +74,7 @@ class RtpSapTransmit {
/// \return vector<uint8_t>&
///
std::vector<uint8_t>& GetBuffer(uint32_t width, uint32_t height, ::mediax::rtp::ColourspaceType encoding) {
uint32_t size = width * height * (BitsPerPixel(encoding) / (double)8);
uint32_t size = width * height * (BitsPerPixel(encoding) / 8.0);
data_buffer_.resize(size);
return data_buffer_;
}
Expand Down

0 comments on commit f596fa3

Please sign in to comment.