mirror of
https://github.com/ossrs/srs.git
synced 2025-02-13 03:41:55 +00:00
refine for bug #288, drop info frame without error.
This commit is contained in:
commit
63309a0538
3 changed files with 14 additions and 5 deletions
|
@ -336,6 +336,13 @@ int SrsAvcAacCodec::video_avc_demux(char* data, int size, SrsCodecSample* sample
|
||||||
|
|
||||||
sample->frame_type = (SrsCodecVideoAVCFrame)frame_type;
|
sample->frame_type = (SrsCodecVideoAVCFrame)frame_type;
|
||||||
|
|
||||||
|
// ignore info frame without error,
|
||||||
|
// @see https://github.com/winlinvip/simple-rtmp-server/issues/288#issuecomment-69863909
|
||||||
|
if (sample->frame_type == SrsCodecVideoAVCFrameVideoInfoFrame) {
|
||||||
|
srs_warn("hls igone the info frame, ret=%d", ret);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
// only support h.264/avc
|
// only support h.264/avc
|
||||||
if (codec_id != SrsCodecVideoAVC) {
|
if (codec_id != SrsCodecVideoAVC) {
|
||||||
ret = ERROR_HLS_DECODE_ERROR;
|
ret = ERROR_HLS_DECODE_ERROR;
|
||||||
|
|
|
@ -1489,14 +1489,16 @@ int SrsHls::on_video(SrsSharedPtrMessage* __video)
|
||||||
|
|
||||||
sample->clear();
|
sample->clear();
|
||||||
if ((ret = codec->video_avc_demux(video->payload, video->size, sample)) != ERROR_SUCCESS) {
|
if ((ret = codec->video_avc_demux(video->payload, video->size, sample)) != ERROR_SUCCESS) {
|
||||||
if (sample->frame_type == SrsCodecVideoAVCFrameVideoInfoFrame) {
|
|
||||||
srs_warn("hls igone the info frame, ret=%d", ret);
|
|
||||||
return ERROR_SUCCESS;
|
|
||||||
}
|
|
||||||
srs_error("hls codec demux video failed. ret=%d", ret);
|
srs_error("hls codec demux video failed. ret=%d", ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ignore info frame,
|
||||||
|
// @see https://github.com/winlinvip/simple-rtmp-server/issues/288#issuecomment-69863909
|
||||||
|
if (sample->frame_type == SrsCodecVideoAVCFrameVideoInfoFrame) {
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
if (codec->video_codec_id != SrsCodecVideoAVC) {
|
if (codec->video_codec_id != SrsCodecVideoAVC) {
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
// current release version
|
// current release version
|
||||||
#define VERSION_MAJOR 2
|
#define VERSION_MAJOR 2
|
||||||
#define VERSION_MINOR 0
|
#define VERSION_MINOR 0
|
||||||
#define VERSION_REVISION 93
|
#define VERSION_REVISION 94
|
||||||
|
|
||||||
// server info.
|
// server info.
|
||||||
#define RTMP_SIG_SRS_KEY "SRS"
|
#define RTMP_SIG_SRS_KEY "SRS"
|
||||||
|
|
Loading…
Reference in a new issue