winlin

merge from feilong for bug #281.

@@ -508,6 +508,7 @@ Supported operating systems and hardware: @@ -508,6 +508,7 @@ Supported operating systems and hardware:
508 * 2013-10-17, Created.<br/> 508 * 2013-10-17, Created.<br/>
509 509
510 ## History 510 ## History
  511 +* v2.0, 2015-01-08, hotfix [#281](https://github.com/winlinvip/simple-rtmp-server/issues/281), fix hls bug ignore type-9 send aud. 2.0.93
511 * v2.0, 2015-01-03, fix [#274](https://github.com/winlinvip/simple-rtmp-server/issues/274), http-callback support on_dvr when reap a dvr file. 2.0.89 512 * v2.0, 2015-01-03, fix [#274](https://github.com/winlinvip/simple-rtmp-server/issues/274), http-callback support on_dvr when reap a dvr file. 2.0.89
512 * v2.0, 2015-01-03, hotfix to remove the pageUrl for http callback. 2.0.88 513 * v2.0, 2015-01-03, hotfix to remove the pageUrl for http callback. 2.0.88
513 * v2.0, 2015-01-03, fix [#179](https://github.com/winlinvip/simple-rtmp-server/issues/179), dvr support custom filepath by variables. 2.0.87 514 * v2.0, 2015-01-03, fix [#179](https://github.com/winlinvip/simple-rtmp-server/issues/179), dvr support custom filepath by variables. 2.0.87
@@ -561,6 +562,7 @@ Supported operating systems and hardware: @@ -561,6 +562,7 @@ Supported operating systems and hardware:
561 * v2.0, 2014-10-18, remove supports for OSX(darwin). 2.0.1. 562 * v2.0, 2014-10-18, remove supports for OSX(darwin). 2.0.1.
562 * v2.0, 2014-10-16, revert github srs README to English. 2.0.0. 563 * v2.0, 2014-10-16, revert github srs README to English. 2.0.0.
563 564
  565 +* 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
564 * v1.0, 2015-01-03, hotfix to remove the pageUrl for http callback. 1.0.19 566 * v1.0, 2015-01-03, hotfix to remove the pageUrl for http callback. 1.0.19
565 * 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 567 * 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
566 * 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 568 * 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
@@ -1272,9 +1272,13 @@ int SrsHlsCache::cache_video(SrsAvcAacCodec* codec, SrsCodecSample* sample) @@ -1272,9 +1272,13 @@ int SrsHlsCache::cache_video(SrsAvcAacCodec* codec, SrsCodecSample* sample)
1272 // 6: Supplemental enhancement information (SEI) sei_rbsp( ), page 61 1272 // 6: Supplemental enhancement information (SEI) sei_rbsp( ), page 61
1273 // @see: ngx_rtmp_hls_append_aud 1273 // @see: ngx_rtmp_hls_append_aud
1274 if (!aud_sent) { 1274 if (!aud_sent) {
1275 - if (nal_unit_type == 9) { 1275 + // @remark, when got type 9, we donot send aud_nal, but it will make
  1276 + // ios unhappy, so we remove it.
  1277 + // @see https://github.com/winlinvip/simple-rtmp-server/issues/281
  1278 + /*if (nal_unit_type == 9) {
1276 aud_sent = true; 1279 aud_sent = true;
1277 - } 1280 + }*/
  1281 +
1278 if (nal_unit_type == 1 || nal_unit_type == 5 || nal_unit_type == 6) { 1282 if (nal_unit_type == 1 || nal_unit_type == 5 || nal_unit_type == 6) {
1279 // for type 6, append a aud with type 9. 1283 // for type 6, append a aud with type 9.
1280 vb->append((const char*)aud_nal, sizeof(aud_nal)); 1284 vb->append((const char*)aud_nal, sizeof(aud_nal));
@@ -1485,6 +1489,10 @@ int SrsHls::on_video(SrsSharedPtrMessage* __video) @@ -1485,6 +1489,10 @@ int SrsHls::on_video(SrsSharedPtrMessage* __video)
1485 1489
1486 sample->clear(); 1490 sample->clear();
1487 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 + }
1488 srs_error("hls codec demux video failed. ret=%d", ret); 1496 srs_error("hls codec demux video failed. ret=%d", ret);
1489 return ret; 1497 return ret;
1490 } 1498 }
@@ -31,7 +31,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. @@ -31,7 +31,8 @@ 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 92 34 +#define VERSION_REVISION 93
  35 +
35 // server info. 36 // server info.
36 #define RTMP_SIG_SRS_KEY "SRS" 37 #define RTMP_SIG_SRS_KEY "SRS"
37 #define RTMP_SIG_SRS_ROLE "origin/edge server" 38 #define RTMP_SIG_SRS_ROLE "origin/edge server"