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
|
|
@ -540,7 +540,11 @@ srs_error_t SrsDash::on_audio(SrsSharedPtrMessage* shared_audio, SrsFormat* form
|
|||
if (!enabled) {
|
||||
return err;
|
||||
}
|
||||
|
||||
|
||||
if (!format->acodec) {
|
||||
return err;
|
||||
}
|
||||
|
||||
if ((err = controller->on_audio(shared_audio, format)) != srs_success) {
|
||||
return srs_error_wrap(err, "Consume audio failed");
|
||||
}
|
||||
|
|
@ -555,7 +559,11 @@ srs_error_t SrsDash::on_video(SrsSharedPtrMessage* shared_video, SrsFormat* form
|
|||
if (!enabled) {
|
||||
return err;
|
||||
}
|
||||
|
||||
|
||||
if (!format->vcodec) {
|
||||
return err;
|
||||
}
|
||||
|
||||
if ((err = controller->on_video(shared_video, format)) != srs_success) {
|
||||
return srs_error_wrap(err, "Consume video failed");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -931,6 +931,12 @@ srs_error_t SrsOriginHub::on_audio(SrsSharedPtrMessage* shared_audio)
|
|||
if ((err = format->on_audio(msg)) != srs_success) {
|
||||
return srs_error_wrap(err, "format consume audio");
|
||||
}
|
||||
|
||||
// Ignore if no format->acodec, it means the codec is not parsed, or unsupport/unknown codec
|
||||
// such as G.711 codec
|
||||
if (!format->acodec) {
|
||||
return err;
|
||||
}
|
||||
|
||||
// cache the sequence header if aac
|
||||
// donot cache the sequence header to gop_cache, return here.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue