winlin

fix #281, fix hls bug ignore type-9 send aud. 1.0.20

@@ -383,6 +383,7 @@ Supported operating systems and hardware: @@ -383,6 +383,7 @@ Supported operating systems and hardware:
383 * 2013-10-17, Created.<br/> 383 * 2013-10-17, Created.<br/>
384 384
385 ## History 385 ## History
  386 +* v1.0, 2015-01-08, hotfix [#281](https://github.com/winlinvip/simple-rtmp-server/issues/281), fix hls bug ignore type-9 send aud. 1.0.20
386 * v1.0, 2015-01-03, hotfix to remove the pageUrl for http callback. 1.0.19 387 * v1.0, 2015-01-03, hotfix to remove the pageUrl for http callback. 1.0.19
387 * v1.0, 2015-01-02, hotfix [#207](https://github.com/winlinvip/simple-rtmp-server/issues/207), trim the last 0 of log. 1.0.18 388 * v1.0, 2015-01-02, hotfix [#207](https://github.com/winlinvip/simple-rtmp-server/issues/207), trim the last 0 of log. 1.0.18
388 * v1.0, 2015-01-02, hotfix [#216](https://github.com/winlinvip/simple-rtmp-server/issues/216), http-callback post in application/json content-type. 1.0.17 389 * v1.0, 2015-01-02, hotfix [#216](https://github.com/winlinvip/simple-rtmp-server/issues/216), http-callback post in application/json content-type. 1.0.17
@@ -1276,9 +1276,13 @@ int SrsHlsCache::cache_video(SrsAvcAacCodec* codec, SrsCodecSample* sample) @@ -1276,9 +1276,13 @@ int SrsHlsCache::cache_video(SrsAvcAacCodec* codec, SrsCodecSample* sample)
1276 // 6: Supplemental enhancement information (SEI) sei_rbsp( ), page 61 1276 // 6: Supplemental enhancement information (SEI) sei_rbsp( ), page 61
1277 // @see: ngx_rtmp_hls_append_aud 1277 // @see: ngx_rtmp_hls_append_aud
1278 if (!aud_sent) { 1278 if (!aud_sent) {
1279 - if (nal_unit_type == 9) { 1279 + // @remark, when got type 9, we donot send aud_nal, but it will make
  1280 + // ios unhappy, so we remove it.
  1281 + // @see https://github.com/winlinvip/simple-rtmp-server/issues/281
  1282 + /*if (nal_unit_type == 9) {
1280 aud_sent = true; 1283 aud_sent = true;
1281 - } 1284 + }*/
  1285 +
1282 if (nal_unit_type == 1 || nal_unit_type == 5 || nal_unit_type == 6) { 1286 if (nal_unit_type == 1 || nal_unit_type == 5 || nal_unit_type == 6) {
1283 // for type 6, append a aud with type 9. 1287 // for type 6, append a aud with type 9.
1284 vb->append((const char*)aud_nal, sizeof(aud_nal)); 1288 vb->append((const char*)aud_nal, sizeof(aud_nal));
@@ -1487,6 +1491,10 @@ int SrsHls::on_video(SrsSharedPtrMessage* video) @@ -1487,6 +1491,10 @@ int SrsHls::on_video(SrsSharedPtrMessage* video)
1487 1491
1488 sample->clear(); 1492 sample->clear();
1489 if ((ret = codec->video_avc_demux(video->payload, video->size, sample)) != ERROR_SUCCESS) { 1493 if ((ret = codec->video_avc_demux(video->payload, video->size, sample)) != ERROR_SUCCESS) {
  1494 + if (sample->frame_type == SrsCodecVideoAVCFrameVideoInfoFrame) {
  1495 + srs_warn("hls igone the info frame, ret=%d", ret);
  1496 + return ERROR_SUCCESS;
  1497 + }
1490 srs_error("hls codec demux video failed. ret=%d", ret); 1498 srs_error("hls codec demux video failed. ret=%d", ret);
1491 return ret; 1499 return ret;
1492 } 1500 }
@@ -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 1 32 #define VERSION_MAJOR 1
33 #define VERSION_MINOR 0 33 #define VERSION_MINOR 0
34 -#define VERSION_REVISION 19 34 +#define VERSION_REVISION 20
35 // server info. 35 // server info.
36 #define RTMP_SIG_SRS_KEY "SRS" 36 #define RTMP_SIG_SRS_KEY "SRS"
37 #define RTMP_SIG_SRS_ROLE "origin/edge server" 37 #define RTMP_SIG_SRS_ROLE "origin/edge server"