Skip to content

Commit

Permalink
Improved ignoring unused bitstream formats
Browse files Browse the repository at this point in the history
  • Loading branch information
Keukhan committed Jan 2, 2025
1 parent 1221e69 commit c876833
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions src/projects/modules/ffmpeg/ffmpeg_writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -361,9 +361,24 @@ namespace ffmpeg
return true;
}
}
else if (_output_format_name == "mpegts")
else if (_output_format_name == "mpegts") // TS, SRT
{
// Passthrough
switch(packet->GetBitstreamFormat())
{
case cmn::BitstreamFormat::H264_ANNEXB:
case cmn::BitstreamFormat::H264_AVCC:
case cmn::BitstreamFormat::H265_ANNEXB:
case cmn::BitstreamFormat::HVCC:
case cmn::BitstreamFormat::AAC_RAW:
case cmn::BitstreamFormat::AAC_ADTS:
case cmn::BitstreamFormat::AAC_LATM:
case cmn::BitstreamFormat::OPUS:
case cmn::BitstreamFormat::MP3:
break;
default:
// Unsupported bitstream foramt, but it is not an error.
return true;
}
}

auto av_format = GetAVFormatContext();
Expand Down

0 comments on commit c876833

Please sign in to comment.