Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch, schedulerChannel reading .ts file format, crash. #1611

Merged
merged 1 commit into from
Apr 25, 2024

Conversation

trapasso
Copy link
Contributor

ScheduledChannel, when it reads a file, ts format, previously saved with startRecord, CRASH.
This P.R. solves the problem, simply by changing the bitstream type.

bool use_annexb { std::strncmp(context->iformat->name, "mpegts", 6) == 0 };

case cmn::MediaCodecId::H264:
	bitstream_format = (use_annexb) ? cmn::BitstreamFormat::H264_ANNEXB : cmn::BitstreamFormat::H264_AVCC;
	packet_type = cmn::PacketType::NALU;
	break;
case cmn::MediaCodecId::H265:
	bitstream_format = (use_annexb) ? cmn::BitstreamFormat::H265_ANNEXB : cmn::BitstreamFormat::HVCC;
	packet_type = cmn::PacketType::NALU;
	break;

Mpegts use annexb.
Many thanks in advance.

@getroot getroot self-requested a review April 25, 2024 14:22
@getroot
Copy link
Member

getroot commented Apr 25, 2024

Thank you!

@getroot getroot merged commit fef961f into AirenSoft:master Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants