修复mp4点播时,sps pps太长导致获取失败的问题
This commit is contained in:
parent
5af247aba0
commit
c997d11bd1
|
|
@ -98,7 +98,7 @@ void MP4Demuxer::onVideoTrack(uint32_t track, uint8_t object, int width, int hei
|
|||
|
||||
struct mpeg4_avc_t avc = {0};
|
||||
if (mpeg4_avc_decoder_configuration_record_load((uint8_t *) extra, bytes, &avc) > 0) {
|
||||
uint8_t config[1024] = {0};
|
||||
uint8_t config[1024 * 10] = {0};
|
||||
int size = mpeg4_avc_to_nalu(&avc, config, sizeof(config));
|
||||
if (size > 0) {
|
||||
video->inputFrame(std::make_shared<H264FrameNoCacheAble>((char *)config, size, 0, 4));
|
||||
|
|
@ -112,7 +112,7 @@ void MP4Demuxer::onVideoTrack(uint32_t track, uint8_t object, int width, int hei
|
|||
|
||||
struct mpeg4_hevc_t hevc = {0};
|
||||
if (mpeg4_hevc_decoder_configuration_record_load((uint8_t *) extra, bytes, &hevc) > 0) {
|
||||
uint8_t config[1024] = {0};
|
||||
uint8_t config[1024 * 10] = {0};
|
||||
int size = mpeg4_hevc_to_nalu(&hevc, config, sizeof(config));
|
||||
if (size > 0) {
|
||||
video->inputFrame(std::make_shared<H265FrameNoCacheAble>((char *) config, size, 0, 4));
|
||||
|
|
|
|||
Loading…
Reference in New Issue