winlin

refine code, remove the base dts, donot drop start BP frames

@@ -646,6 +646,11 @@ int SrsTSMuxer::write_audio(u_int32_t time, SrsCodec* codec, SrsCodecSample* sam @@ -646,6 +646,11 @@ int SrsTSMuxer::write_audio(u_int32_t time, SrsCodec* codec, SrsCodecSample* sam
646 audio_buffer->append(buf->bytes, buf->size); 646 audio_buffer->append(buf->bytes, buf->size);
647 } 647 }
648 648
  649 + if ((ret = SrsMpegtsWriter::write_frame(fd, audio_frame, audio_buffer)) != ERROR_SUCCESS) {
  650 + return ret;
  651 + }
  652 + srs_freep(audio_frame);
  653 +
649 return ret; 654 return ret;
650 } 655 }
651 656
@@ -723,11 +728,6 @@ int SrsTSMuxer::write_video(u_int32_t time, SrsCodec* codec, SrsCodecSample* sam @@ -723,11 +728,6 @@ int SrsTSMuxer::write_video(u_int32_t time, SrsCodec* codec, SrsCodecSample* sam
723 return ret; 728 return ret;
724 } 729 }
725 730
726 - if ((ret = SrsMpegtsWriter::write_frame(fd, audio_frame, audio_buffer)) != ERROR_SUCCESS) {  
727 - return ret;  
728 - }  
729 - srs_freep(audio_frame);  
730 -  
731 return ret; 731 return ret;
732 } 732 }
733 733