mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
For #1506, ignore video when codec is unknown.
This commit is contained in:
parent
65c66592e9
commit
52c6c7c45d
2 changed files with 14 additions and 2 deletions
1
trunk/.gitignore
vendored
1
trunk/.gitignore
vendored
|
@ -2,6 +2,7 @@
|
||||||
/*.conf
|
/*.conf
|
||||||
/*.txt
|
/*.txt
|
||||||
/*.flv
|
/*.flv
|
||||||
|
/*.mp4
|
||||||
/doc/frozen*.flv
|
/doc/frozen*.flv
|
||||||
/doc/kungfupanda*.flv
|
/doc/kungfupanda*.flv
|
||||||
/doc/time*.flv
|
/doc/time*.flv
|
||||||
|
|
|
@ -1195,6 +1195,12 @@ srs_error_t SrsHls::on_audio(SrsSharedPtrMessage* shared_audio, SrsFormat* forma
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Ignore if no format->acodec, it means the codec is not parsed, or unknown codec.
|
||||||
|
// @issue https://github.com/ossrs/srs/issues/1506#issuecomment-562079474
|
||||||
|
if (!format->acodec) {
|
||||||
|
return err;
|
||||||
|
}
|
||||||
|
|
||||||
// update the hls time, for hls_dispose.
|
// update the hls time, for hls_dispose.
|
||||||
last_update_time = srs_get_system_time();
|
last_update_time = srs_get_system_time();
|
||||||
|
|
||||||
|
@ -1202,7 +1208,6 @@ srs_error_t SrsHls::on_audio(SrsSharedPtrMessage* shared_audio, SrsFormat* forma
|
||||||
SrsAutoFree(SrsSharedPtrMessage, audio);
|
SrsAutoFree(SrsSharedPtrMessage, audio);
|
||||||
|
|
||||||
// ts support audio codec: aac/mp3
|
// ts support audio codec: aac/mp3
|
||||||
srs_assert(format->acodec);
|
|
||||||
SrsAudioCodecId acodec = format->acodec->id;
|
SrsAudioCodecId acodec = format->acodec->id;
|
||||||
if (acodec != SrsAudioCodecIdAAC && acodec != SrsAudioCodecIdMP3) {
|
if (acodec != SrsAudioCodecIdAAC && acodec != SrsAudioCodecIdMP3) {
|
||||||
return err;
|
return err;
|
||||||
|
@ -1252,6 +1257,12 @@ srs_error_t SrsHls::on_video(SrsSharedPtrMessage* shared_video, SrsFormat* forma
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Ignore if no format->vcodec, it means the codec is not parsed, or unknown codec.
|
||||||
|
// @issue https://github.com/ossrs/srs/issues/1506#issuecomment-562079474
|
||||||
|
if (!format->vcodec) {
|
||||||
|
return err;
|
||||||
|
}
|
||||||
|
|
||||||
// update the hls time, for hls_dispose.
|
// update the hls time, for hls_dispose.
|
||||||
last_update_time = srs_get_system_time();
|
last_update_time = srs_get_system_time();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue