正在显示
1 个修改的文件
包含
5 行增加
和
5 行删除
trunk/src/core/srs_core_hls.cpp
100644 → 100755
| @@ -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 |
-
请 注册 或 登录 后发表评论