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

Ignore RTC audio transcode error: AVERROR_INVALIDDATA. #4227

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions trunk/src/app/srs_app_rtc_codec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -337,8 +337,13 @@ srs_error_t SrsAudioTranscoder::decode_and_resample(SrsAudioFrame *pkt)
char err_buf[AV_ERROR_MAX_STRING_SIZE] = {0};
int error = avcodec_send_packet(dec_, dec_packet_);
if (error < 0) {
return srs_error_new(ERROR_RTC_RTP_MUXER, "submit to dec(%d,%s)", error,
av_make_error_string(err_buf, AV_ERROR_MAX_STRING_SIZE, error));
char* e_str = av_make_error_string(err_buf, AV_ERROR_MAX_STRING_SIZE, error);
srs_warn("audio dec error(%d, %s)", error, e_str);
// https://github.com/ossrs/srs/issues/4224
// ignore the AVERROR_INVALIDDATA error.
if (error != AVERROR_INVALIDDATA) {
return srs_error_new(ERROR_RTC_RTP_MUXER, "submit to dec(%d,%s)", error, e_str);
}
}

new_pkt_pts_ = pkt->dts + pkt->cts;
Expand Down
Loading