1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-02-14 12:21:55 +00:00

fix #541, failed when chunk size too small. 2.0.202

This commit is contained in:
winlin 2015-12-22 15:39:12 +08:00
parent 69d191e53f
commit cee8c3d07d
3 changed files with 12 additions and 3 deletions

View file

@ -337,6 +337,7 @@ Remark:
## History
* v2.0, 2015-12-22, for [#541][bug #541] failed when chunk size too small. 2.0.202
* v2.0, 2015-12-15, default hls_on_error to continue. 2.0.201
* v2.0, 2015-11-16, for [#518][bug #518] fix fd leak bug when fork. 2.0.200
* v2.0, 2015-11-05, for [#511][bug #511] fix bug for restart thread. 2.0.199
@ -1207,6 +1208,7 @@ Winlin
[bug #515]: https://github.com/ossrs/srs/issues/515
[bug #511]: https://github.com/ossrs/srs/issues/511
[bug #518]: https://github.com/ossrs/srs/issues/518
[bug #541]: https://github.com/ossrs/srs/issues/541
[bug #xxxxxxxxxx]: https://github.com/ossrs/srs/issues/xxxxxxxxxx
[exo #828]: https://github.com/google/ExoPlayer/pull/828

View file

@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// current release version
#define VERSION_MAJOR 2
#define VERSION_MINOR 0
#define VERSION_REVISION 201
#define VERSION_REVISION 202
// server info.
#define RTMP_SIG_SRS_KEY "SRS"

View file

@ -1514,10 +1514,17 @@ int SrsProtocol::on_recv_message(SrsCommonMessage* msg)
{
srs_warn("accept chunk size %d, but should in [%d, %d], "
"@see: https://github.com/ossrs/srs/issues/160",
pkt->chunk_size, SRS_CONSTS_RTMP_MIN_CHUNK_SIZE,
SRS_CONSTS_RTMP_MAX_CHUNK_SIZE);
pkt->chunk_size, SRS_CONSTS_RTMP_MIN_CHUNK_SIZE, SRS_CONSTS_RTMP_MAX_CHUNK_SIZE);
}
// @see: https://github.com/ossrs/srs/issues/541
if (pkt->chunk_size < SRS_CONSTS_RTMP_MIN_CHUNK_SIZE) {
ret = ERROR_RTMP_CHUNK_SIZE;
srs_error("chunk size should be %d+, value=%d. ret=%d",
SRS_CONSTS_RTMP_MIN_CHUNK_SIZE, pkt->chunk_size, ret);
return ret;
}
in_chunk_size = pkt->chunk_size;
srs_trace("input chunk size to %d", pkt->chunk_size);