正在显示
1 个修改的文件
包含
13 行增加
和
1 行删除
| @@ -696,7 +696,19 @@ int SrsAvcAacCodec::video_avc_demux(char* data, int size, SrsCodecSample* sample | @@ -696,7 +696,19 @@ int SrsAvcAacCodec::video_avc_demux(char* data, int size, SrsCodecSample* sample | ||
| 696 | // One or more NALUs (Full frames are required) | 696 | // One or more NALUs (Full frames are required) |
| 697 | // try "AnnexB" from H.264-AVC-ISO_IEC_14496-10.pdf, page 211. | 697 | // try "AnnexB" from H.264-AVC-ISO_IEC_14496-10.pdf, page 211. |
| 698 | if ((ret = avc_demux_annexb_format(stream, sample)) != ERROR_SUCCESS) { | 698 | if ((ret = avc_demux_annexb_format(stream, sample)) != ERROR_SUCCESS) { |
| 699 | - return ret; | 699 | + // ok, we guess out the payload is annexb, but maybe changed to ibmf. |
| 700 | + if (ret != ERROR_HLS_AVC_TRY_OTHERS) { | ||
| 701 | + srs_error("avc demux for annexb failed. ret=%d", ret); | ||
| 702 | + return ret; | ||
| 703 | + } | ||
| 704 | + | ||
| 705 | + // try "ISO Base Media File Format" from H.264-AVC-ISO_IEC_14496-15.pdf, page 20 | ||
| 706 | + if ((ret = avc_demux_ibmf_format(stream, sample)) != ERROR_SUCCESS) { | ||
| 707 | + return ret; | ||
| 708 | + } else { | ||
| 709 | + payload_format = SrsAvcPayloadFormatIbmf; | ||
| 710 | + srs_warn("hls avc payload change from annexb to ibmf format."); | ||
| 711 | + } | ||
| 700 | } | 712 | } |
| 701 | srs_info("hls decode avc payload in annexb format."); | 713 | srs_info("hls decode avc payload in annexb format."); |
| 702 | } | 714 | } |
-
请 注册 或 登录 后发表评论