mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
For #2516, fix codec issue for G.711 or H.263. 4.0.152
This commit is contained in:
parent
452ca7e88f
commit
ab988abc59
5 changed files with 28 additions and 5 deletions
|
@ -3064,7 +3064,11 @@ srs_error_t SrsTsTransmuxer::write_audio(int64_t timestamp, char* data, int size
|
|||
if ((err = format->on_audio(timestamp, data, size)) != srs_success) {
|
||||
return srs_error_wrap(err, "ts: format on audio");
|
||||
}
|
||||
|
||||
|
||||
if (!format->acodec) {
|
||||
return err;
|
||||
}
|
||||
|
||||
// ts support audio codec: aac/mp3
|
||||
srs_assert(format->acodec && format->audio);
|
||||
if (format->acodec->id != SrsAudioCodecIdAAC && format->acodec->id != SrsAudioCodecIdMP3) {
|
||||
|
@ -3100,7 +3104,11 @@ srs_error_t SrsTsTransmuxer::write_video(int64_t timestamp, char* data, int size
|
|||
if ((err = format->on_video(timestamp, data, size)) != srs_success) {
|
||||
return srs_error_wrap(err, "ts: on video");
|
||||
}
|
||||
|
||||
|
||||
if (!format->vcodec) {
|
||||
return err;
|
||||
}
|
||||
|
||||
// ignore info frame,
|
||||
// @see https://github.com/ossrs/srs/issues/288#issuecomment-69863909
|
||||
srs_assert(format->video && format->vcodec);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue