Skip to content

Commit

Permalink
Ignore RTC audio transcode error: AVERROR_INVALIDDATA.
Browse files Browse the repository at this point in the history
  • Loading branch information
suzp1984 committed Nov 11, 2024
1 parent 7951bf3 commit 3c684fa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion trunk/src/app/srs_app_rtc_codec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,9 @@ 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) {
// https://github.com/ossrs/srs/issues/4224
// ignore the AVERROR_INVALIDDATA error.
if (error < 0 && error != AVERROR_INVALIDDATA) {
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));
}
Expand Down

0 comments on commit 3c684fa

Please sign in to comment.