winlin

fix #49, open the sample access by default.

@@ -1086,6 +1086,12 @@ int SrsRtmpServer::start_play(int stream_id) @@ -1086,6 +1086,12 @@ int SrsRtmpServer::start_play(int stream_id)
1086 // |RtmpSampleAccess(false, false) 1086 // |RtmpSampleAccess(false, false)
1087 if (true) { 1087 if (true) {
1088 SrsSampleAccessPacket* pkt = new SrsSampleAccessPacket(); 1088 SrsSampleAccessPacket* pkt = new SrsSampleAccessPacket();
  1089 +
  1090 + // allow audio/video sample.
  1091 + // @see: https://github.com/winlinvip/simple-rtmp-server/issues/49
  1092 + pkt->audio_sample_access = true;
  1093 + pkt->video_sample_access = true;
  1094 +
1089 if ((ret = protocol->send_and_free_packet(pkt, stream_id)) != ERROR_SUCCESS) { 1095 if ((ret = protocol->send_and_free_packet(pkt, stream_id)) != ERROR_SUCCESS) {
1090 srs_error("send |RtmpSampleAccess(false, false) message failed. ret=%d", ret); 1096 srs_error("send |RtmpSampleAccess(false, false) message failed. ret=%d", ret);
1091 return ret; 1097 return ret;