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