Commit 7c29c417 by xiongziliang

修复mp4v2在win32上崩溃的问题

parent 9c53248e
......@@ -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"
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论