Mediaplayer: Suppress -Werror=class-memaccess
Suppress -Werror=class-memaccess pointed out by gcc8. * Remove unneed memset(), since media_format is cleared by constructor. * Use media_format::Clear() instead of memset() Change-Id: I02e19c1fab1f1b3f6c348e1d3ac63536d5c829b2 Reviewed-on: https://review.haiku-os.org/484 Reviewed-by: Barrett17 <[email protected]>
This commit is contained in:
@@ -41,7 +41,6 @@ NodeManager::Connection::Connection()
|
|||||||
:
|
:
|
||||||
connected(false)
|
connected(false)
|
||||||
{
|
{
|
||||||
memset(&format, 0, sizeof(media_format));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -268,7 +268,7 @@ status_t
|
|||||||
MediaTrackVideoSupplier::_SwitchFormat(color_space format, uint32 bytesPerRow)
|
MediaTrackVideoSupplier::_SwitchFormat(color_space format, uint32 bytesPerRow)
|
||||||
{
|
{
|
||||||
// get the encoded format
|
// get the encoded format
|
||||||
memset(&fFormat, 0, sizeof(media_format));
|
fFormat.Clear();
|
||||||
status_t ret = fVideoTrack->EncodedFormat(&fFormat);
|
status_t ret = fVideoTrack->EncodedFormat(&fFormat);
|
||||||
if (ret < B_OK) {
|
if (ret < B_OK) {
|
||||||
printf("MediaTrackVideoSupplier::_SwitchFormat() - "
|
printf("MediaTrackVideoSupplier::_SwitchFormat() - "
|
||||||
@@ -349,7 +349,7 @@ MediaTrackVideoSupplier::_SetDecodedFormat(uint32 width, uint32 height,
|
|||||||
{
|
{
|
||||||
// specifiy the decoded format. we derive this information from
|
// specifiy the decoded format. we derive this information from
|
||||||
// the encoded format (width & height).
|
// the encoded format (width & height).
|
||||||
memset(&fFormat, 0, sizeof(media_format));
|
fFormat.Clear();
|
||||||
// fFormat.u.raw_video.last_active = height - 1;
|
// fFormat.u.raw_video.last_active = height - 1;
|
||||||
// fFormat.u.raw_video.orientation = B_VIDEO_TOP_LEFT_RIGHT;
|
// fFormat.u.raw_video.orientation = B_VIDEO_TOP_LEFT_RIGHT;
|
||||||
// fFormat.u.raw_video.pixel_width_aspect = 1;
|
// fFormat.u.raw_video.pixel_width_aspect = 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user