winlin

fix #421, when mix correct on, must check the type of dequeue msg.

@@ -1479,7 +1479,11 @@ int SrsSource::on_audio(SrsCommonMessage* shared_audio) @@ -1479,7 +1479,11 @@ int SrsSource::on_audio(SrsCommonMessage* shared_audio)
1479 } 1479 }
1480 1480
1481 // consume the monotonically increase message. 1481 // consume the monotonically increase message.
1482 - ret = on_audio_imp(m); 1482 + if (m->is_audio()) {
  1483 + ret = on_audio_imp(m);
  1484 + } else {
  1485 + ret = on_video_imp(m);
  1486 + }
1483 srs_freep(m); 1487 srs_freep(m);
1484 1488
1485 return ret; 1489 return ret;
@@ -1670,7 +1674,11 @@ int SrsSource::on_video(SrsCommonMessage* shared_video) @@ -1670,7 +1674,11 @@ int SrsSource::on_video(SrsCommonMessage* shared_video)
1670 SrsAutoFree(SrsSharedPtrMessage, m); 1674 SrsAutoFree(SrsSharedPtrMessage, m);
1671 1675
1672 // consume the monotonically increase message. 1676 // consume the monotonically increase message.
1673 - ret = on_video_imp(m); 1677 + if (m->is_audio()) {
  1678 + ret = on_audio_imp(m);
  1679 + } else {
  1680 + ret = on_video_imp(m);
  1681 + }
1674 srs_freep(m); 1682 srs_freep(m);
1675 1683
1676 return ret; 1684 return ret;