Mediaconverter: Suppress warnings
Use media_format.Clear() to suppress -Werror=class-memaccess pointed out by gcc8. Change-Id: I810cfac2db78914059bdd4ddb29d2eb0bccd9650
This commit is contained in:
parent
34a10069f4
commit
9f9afda5ce
@ -381,11 +381,11 @@ MediaConverterApp::_ConvertFile(BMediaFile* inFile, BMediaFile* outFile,
|
||||
int32 tracks = inFile->CountTracks();
|
||||
for (int32 i = 0; i < tracks && (!outAudTrack || !outVidTrack); i++) {
|
||||
BMediaTrack* inTrack = inFile->TrackAt(i);
|
||||
memset(&inFormat, 0, sizeof(media_format));
|
||||
inFormat.Clear();
|
||||
inTrack->EncodedFormat(&inFormat);
|
||||
if (inFormat.IsAudio() && (audioCodec != NULL)) {
|
||||
inAudTrack = inTrack;
|
||||
memset(&outAudFormat, 0, sizeof(media_format));
|
||||
outAudFormat.Clear();
|
||||
outAudFormat.type = B_MEDIA_RAW_AUDIO;
|
||||
raf = &(outAudFormat.u.raw_audio);
|
||||
inTrack->DecodedFormat(&outAudFormat);
|
||||
@ -416,7 +416,7 @@ MediaConverterApp::_ConvertFile(BMediaFile* inFile, BMediaFile* outFile,
|
||||
height = (int32)inFormat.Height();
|
||||
|
||||
// construct desired decoded video format
|
||||
memset(&outVidFormat, 0, sizeof(outVidFormat));
|
||||
outVidFormat.Clear();
|
||||
outVidFormat.type = B_MEDIA_RAW_VIDEO;
|
||||
rvf = &(outVidFormat.u.raw_video);
|
||||
rvf->last_active = (uint32)(height - 1);
|
||||
|
@ -569,7 +569,7 @@ MediaConverterWindow::BuildAudioVideoMenus()
|
||||
media_file_format* mf_format = &(ffmi->fFileFormat);
|
||||
|
||||
media_format format, outfmt;
|
||||
memset(&format, 0, sizeof(format));
|
||||
format.Clear();
|
||||
media_codec_info codec_info;
|
||||
int32 cookie = 0;
|
||||
CodecMenuItem* cmi;
|
||||
@ -622,7 +622,7 @@ MediaConverterWindow::BuildAudioVideoMenus()
|
||||
// construct a generic video format. Some of these parameters
|
||||
// seem silly, but are needed for R4.5.x, which is more picky
|
||||
// than subsequent BeOS releases will be.
|
||||
memset(&format, 0, sizeof(format));
|
||||
format.Clear();
|
||||
format.type = B_MEDIA_RAW_VIDEO;
|
||||
format.u.raw_video.last_active = (uint32)(240 - 1);
|
||||
format.u.raw_video.orientation = B_VIDEO_TOP_LEFT_RIGHT;
|
||||
|
@ -30,7 +30,7 @@ MediaFileInfo::LoadInfo(BMediaFile* file)
|
||||
|
||||
BMediaTrack* track;
|
||||
media_format format;
|
||||
memset(&format, 0, sizeof(format));
|
||||
format.Clear();
|
||||
media_codec_info codecInfo;
|
||||
bool audioDone(false), videoDone(false);
|
||||
bigtime_t audioDuration = 0;
|
||||
@ -57,7 +57,7 @@ MediaFileInfo::LoadInfo(BMediaFile* file)
|
||||
"{0, plural, one{# frame} other{# frames}}"));
|
||||
|
||||
if (format.IsVideo()) {
|
||||
memset(&format, 0, sizeof(format));
|
||||
format.Clear();
|
||||
format.type = B_MEDIA_RAW_VIDEO;
|
||||
|
||||
ret = track->DecodedFormat(&format);
|
||||
@ -87,7 +87,7 @@ MediaFileInfo::LoadInfo(BMediaFile* file)
|
||||
videoDone = true;
|
||||
|
||||
} else if (format.IsAudio()) {
|
||||
memset(&format, 0, sizeof(format));
|
||||
format.Clear();
|
||||
format.type = B_MEDIA_RAW_AUDIO;
|
||||
ret = track->DecodedFormat(&format);
|
||||
if (ret != B_OK)
|
||||
|
Loading…
Reference in New Issue
Block a user