Commit c997d11b by ziyue

修复mp4点播时,sps pps太长导致获取失败的问题

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