mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-25 20:27:34 +08:00
修复mp4录制崩溃的bug:#181
This commit is contained in:
parent
73df1bb949
commit
f32f5df4eb
@ -157,7 +157,7 @@ void MP4Muxer::addTrack(const Track::Ptr &track) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct mpeg4_avc_t avc;
|
struct mpeg4_avc_t avc = {0};
|
||||||
string sps_pps = string("\x00\x00\x00\x01", 4) + h264_track->getSps() +
|
string sps_pps = string("\x00\x00\x00\x01", 4) + h264_track->getSps() +
|
||||||
string("\x00\x00\x00\x01", 4) + h264_track->getPps();
|
string("\x00\x00\x00\x01", 4) + h264_track->getPps();
|
||||||
h264_annexbtomp4(&avc, sps_pps.data(), sps_pps.size(), NULL, 0, NULL, NULL);
|
h264_annexbtomp4(&avc, sps_pps.data(), sps_pps.size(), NULL, 0, NULL, NULL);
|
||||||
@ -194,7 +194,7 @@ void MP4Muxer::addTrack(const Track::Ptr &track) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct mpeg4_hevc_t hevc;
|
struct mpeg4_hevc_t hevc = {0};
|
||||||
string vps_sps_pps = string("\x00\x00\x00\x01", 4) + h265_track->getVps() +
|
string vps_sps_pps = string("\x00\x00\x00\x01", 4) + h265_track->getVps() +
|
||||||
string("\x00\x00\x00\x01", 4) + h265_track->getSps() +
|
string("\x00\x00\x00\x01", 4) + h265_track->getSps() +
|
||||||
string("\x00\x00\x00\x01", 4) + h265_track->getPps();
|
string("\x00\x00\x00\x01", 4) + h265_track->getPps();
|
||||||
|
Loading…
Reference in New Issue
Block a user