mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-22 19:00:01 +08:00
修复mp4v2在win32上崩溃的问题
This commit is contained in:
parent
9c53248e39
commit
7c29c41767
@ -48,6 +48,7 @@ HLSMaker::HLSMaker(const string& strM3u8File,
|
||||
m_strM3u8File = strM3u8File;
|
||||
m_ui32NumSegments = ui32Num;
|
||||
m_ui32SegmentDuration = ui32Duration;
|
||||
m_ui32LastStamp = 0;
|
||||
|
||||
m_strOutputPrefix = strM3u8File.substr(0, strM3u8File.rfind('.'));
|
||||
m_strFileName = m_strOutputPrefix.substr(m_strOutputPrefix.rfind('/') + 1);
|
||||
|
@ -70,17 +70,17 @@ MediaReader::MediaReader(const string &strVhost,const string &strApp, const stri
|
||||
getAVCInfo(m_strSps, (int &)m_video_width, (int &)m_video_height, framerate);
|
||||
m_video_framerate = framerate;
|
||||
m_strSps = string("\x0\x0\x0\x1",4) + m_strSps;
|
||||
free(seqheader[ix]);
|
||||
MP4Free(seqheader[ix]);
|
||||
}
|
||||
free(seqheader);
|
||||
free(seqheadersize);
|
||||
MP4Free(seqheader);
|
||||
MP4Free(seqheadersize);
|
||||
for (ix = 0; pictheadersize[ix] != 0; ix++) {
|
||||
m_strPps.assign("\x0\x0\x0\x1",4);
|
||||
m_strPps.append((char *)(pictheader[ix]), pictheadersize[ix]);
|
||||
free(pictheader[ix]);
|
||||
MP4Free(pictheader[ix]);
|
||||
}
|
||||
free(pictheader);
|
||||
free(pictheadersize);
|
||||
MP4Free(pictheader);
|
||||
MP4Free(pictheadersize);
|
||||
}
|
||||
m_video_ms = 1000.0 * m_video_duration / m_video_timescale;
|
||||
/*InfoL << "\r\n"
|
||||
@ -111,7 +111,7 @@ MediaReader::MediaReader(const string &strVhost,const string &strApp, const stri
|
||||
makeAdtsHeader(m_strAacCfg, m_adts);
|
||||
writeAdtsHeader(m_adts,m_adts.data);
|
||||
getAACInfo(m_adts, (int &)m_audio_sample_rate, (int &)m_audio_num_channels);
|
||||
free(ppConfig);
|
||||
MP4Free(ppConfig);
|
||||
}
|
||||
m_audio_ms = 1000.0 * m_audio_duration / m_audio_sample_rate;
|
||||
/*InfoL << "\r\n"
|
||||
|
Loading…
Reference in New Issue
Block a user