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 <b.vitruvio@gmail.com>
This commit is contained in:
Murai Takashi 2018-05-19 08:58:10 +09:00 committed by Barrett17
parent 3cc5e76f2d
commit 09095817eb
2 changed files with 2 additions and 3 deletions

View File

@ -41,7 +41,6 @@ NodeManager::Connection::Connection()
:
connected(false)
{
memset(&format, 0, sizeof(media_format));
}

View File

@ -268,7 +268,7 @@ status_t
MediaTrackVideoSupplier::_SwitchFormat(color_space format, uint32 bytesPerRow)
{
// get the encoded format
memset(&fFormat, 0, sizeof(media_format));
fFormat.Clear();
status_t ret = fVideoTrack->EncodedFormat(&fFormat);
if (ret < B_OK) {
printf("MediaTrackVideoSupplier::_SwitchFormat() - "
@ -349,7 +349,7 @@ MediaTrackVideoSupplier::_SetDecodedFormat(uint32 width, uint32 height,
{
// specifiy the decoded format. we derive this information from
// 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.orientation = B_VIDEO_TOP_LEFT_RIGHT;
// fFormat.u.raw_video.pixel_width_aspect = 1;