refine for bug #288, drop info frame without error.
正在显示
3 个修改的文件
包含
14 行增加
和
5 行删除
| @@ -336,6 +336,13 @@ int SrsAvcAacCodec::video_avc_demux(char* data, int size, SrsCodecSample* sample | @@ -336,6 +336,13 @@ int SrsAvcAacCodec::video_avc_demux(char* data, int size, SrsCodecSample* sample | ||
| 336 | 336 | ||
| 337 | sample->frame_type = (SrsCodecVideoAVCFrame)frame_type; | 337 | sample->frame_type = (SrsCodecVideoAVCFrame)frame_type; |
| 338 | 338 | ||
| 339 | + // ignore info frame without error, | ||
| 340 | + // @see https://github.com/winlinvip/simple-rtmp-server/issues/288#issuecomment-69863909 | ||
| 341 | + if (sample->frame_type == SrsCodecVideoAVCFrameVideoInfoFrame) { | ||
| 342 | + srs_warn("hls igone the info frame, ret=%d", ret); | ||
| 343 | + return ret; | ||
| 344 | + } | ||
| 345 | + | ||
| 339 | // only support h.264/avc | 346 | // only support h.264/avc |
| 340 | if (codec_id != SrsCodecVideoAVC) { | 347 | if (codec_id != SrsCodecVideoAVC) { |
| 341 | ret = ERROR_HLS_DECODE_ERROR; | 348 | ret = ERROR_HLS_DECODE_ERROR; |
| @@ -1489,14 +1489,16 @@ int SrsHls::on_video(SrsSharedPtrMessage* __video) | @@ -1489,14 +1489,16 @@ int SrsHls::on_video(SrsSharedPtrMessage* __video) | ||
| 1489 | 1489 | ||
| 1490 | sample->clear(); | 1490 | sample->clear(); |
| 1491 | if ((ret = codec->video_avc_demux(video->payload, video->size, sample)) != ERROR_SUCCESS) { | 1491 | if ((ret = codec->video_avc_demux(video->payload, video->size, sample)) != ERROR_SUCCESS) { |
| 1492 | - if (sample->frame_type == SrsCodecVideoAVCFrameVideoInfoFrame) { | ||
| 1493 | - srs_warn("hls igone the info frame, ret=%d", ret); | ||
| 1494 | - return ERROR_SUCCESS; | ||
| 1495 | - } | ||
| 1496 | srs_error("hls codec demux video failed. ret=%d", ret); | 1492 | srs_error("hls codec demux video failed. ret=%d", ret); |
| 1497 | return ret; | 1493 | return ret; |
| 1498 | } | 1494 | } |
| 1499 | 1495 | ||
| 1496 | + // ignore info frame, | ||
| 1497 | + // @see https://github.com/winlinvip/simple-rtmp-server/issues/288#issuecomment-69863909 | ||
| 1498 | + if (sample->frame_type == SrsCodecVideoAVCFrameVideoInfoFrame) { | ||
| 1499 | + return ret; | ||
| 1500 | + } | ||
| 1501 | + | ||
| 1500 | if (codec->video_codec_id != SrsCodecVideoAVC) { | 1502 | if (codec->video_codec_id != SrsCodecVideoAVC) { |
| 1501 | return ret; | 1503 | return ret; |
| 1502 | } | 1504 | } |
| @@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | @@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
| 31 | // current release version | 31 | // current release version |
| 32 | #define VERSION_MAJOR 2 | 32 | #define VERSION_MAJOR 2 |
| 33 | #define VERSION_MINOR 0 | 33 | #define VERSION_MINOR 0 |
| 34 | -#define VERSION_REVISION 93 | 34 | +#define VERSION_REVISION 94 |
| 35 | 35 | ||
| 36 | // server info. | 36 | // server info. |
| 37 | #define RTMP_SIG_SRS_KEY "SRS" | 37 | #define RTMP_SIG_SRS_KEY "SRS" |
-
请 注册 或 登录 后发表评论