winlin

fix #740, convert ts aac audio private stream 1 to common. 2.0.229

@@ -345,6 +345,7 @@ Remark: @@ -345,6 +345,7 @@ Remark:
345 345
346 ## History 346 ## History
347 347
  348 +* v2.0, 2017-01-11, fix [#740][bug #740], convert ts aac audio private stream 1 to common. 2.0.229
348 * v2.0, 2017-01-11, fix [#588][bug #588], kbps interface error. 2.0.228 349 * v2.0, 2017-01-11, fix [#588][bug #588], kbps interface error. 2.0.228
349 * v2.0, 2017-01-11, fix [#736][bug #736], recovery the hls dispose. 2.0.227 350 * v2.0, 2017-01-11, fix [#736][bug #736], recovery the hls dispose. 2.0.227
350 * v2.0, 2017-01-10, refine hls html5 video template. 351 * v2.0, 2017-01-10, refine hls html5 video template.
@@ -1275,6 +1276,7 @@ Winlin @@ -1275,6 +1276,7 @@ Winlin
1275 [bug #635]: https://github.com/ossrs/srs/issues/635 1276 [bug #635]: https://github.com/ossrs/srs/issues/635
1276 [bug #736]: https://github.com/ossrs/srs/issues/736 1277 [bug #736]: https://github.com/ossrs/srs/issues/736
1277 [bug #588]: https://github.com/ossrs/srs/issues/588 1278 [bug #588]: https://github.com/ossrs/srs/issues/588
  1279 +[bug #740]: https://github.com/ossrs/srs/issues/740
1278 [bug #xxxxxxxxxx]: https://github.com/ossrs/srs/issues/xxxxxxxxxx 1280 [bug #xxxxxxxxxx]: https://github.com/ossrs/srs/issues/xxxxxxxxxx
1279 1281
1280 [exo #828]: https://github.com/google/ExoPlayer/pull/828 1282 [exo #828]: https://github.com/google/ExoPlayer/pull/828
@@ -300,6 +300,12 @@ int SrsMpegtsOverUdp::on_ts_message(SrsTsMessage* msg) @@ -300,6 +300,12 @@ int SrsMpegtsOverUdp::on_ts_message(SrsTsMessage* msg)
300 msg->dts, msg->pts, msg->payload->length(), msg->packet->payload_unit_start_indicator, msg->continuity_counter, msg->sid, 300 msg->dts, msg->pts, msg->payload->length(), msg->packet->payload_unit_start_indicator, msg->continuity_counter, msg->sid,
301 msg->is_audio()? "A":msg->is_video()? "V":"N", msg->stream_number()); 301 msg->is_audio()? "A":msg->is_video()? "V":"N", msg->stream_number());
302 } 302 }
  303 +
  304 + // When the audio SID is private stream 1, we use common audio.
  305 + // @see https://github.com/ossrs/srs/issues/740
  306 + if (msg->channel->apply == SrsTsPidApplyAudio && msg->sid == SrsTsPESStreamIdPrivateStream1) {
  307 + msg->sid = SrsTsPESStreamIdAudioCommon;
  308 + }
303 309
304 // when not audio/video, or not adts/annexb format, donot support. 310 // when not audio/video, or not adts/annexb format, donot support.
305 if (msg->stream_number() != 0) { 311 if (msg->stream_number() != 0) {
@@ -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 228 34 +#define VERSION_REVISION 229
35 35
36 // generated by configure, only macros. 36 // generated by configure, only macros.
37 #include <srs_auto_headers.hpp> 37 #include <srs_auto_headers.hpp>
@@ -759,6 +759,12 @@ int SrsIngestSrsOutput::on_ts_message(SrsTsMessage* msg) @@ -759,6 +759,12 @@ int SrsIngestSrsOutput::on_ts_message(SrsTsMessage* msg)
759 msg->dts, msg->pts, msg->payload->length(), msg->packet->payload_unit_start_indicator, msg->continuity_counter, msg->sid, 759 msg->dts, msg->pts, msg->payload->length(), msg->packet->payload_unit_start_indicator, msg->continuity_counter, msg->sid,
760 msg->is_audio()? "A":msg->is_video()? "V":"N", msg->stream_number()); 760 msg->is_audio()? "A":msg->is_video()? "V":"N", msg->stream_number());
761 761
  762 + // When the audio SID is private stream 1, we use common audio.
  763 + // @see https://github.com/ossrs/srs/issues/740
  764 + if (msg->channel->apply == SrsTsPidApplyAudio && msg->sid == SrsTsPESStreamIdPrivateStream1) {
  765 + msg->sid = SrsTsPESStreamIdAudioCommon;
  766 + }
  767 +
762 // when not audio/video, or not adts/annexb format, donot support. 768 // when not audio/video, or not adts/annexb format, donot support.
763 if (msg->stream_number() != 0) { 769 if (msg->stream_number() != 0) {
764 ret = ERROR_STREAM_CASTER_TS_ES; 770 ret = ERROR_STREAM_CASTER_TS_ES;