mirror of
https://github.com/ossrs/srs.git
synced 2025-02-15 04:42:04 +00:00
fix #541, failed when chunk size too small. 2.0.202
This commit is contained in:
parent
69d191e53f
commit
cee8c3d07d
3 changed files with 12 additions and 3 deletions
|
@ -337,6 +337,7 @@ Remark:
|
||||||
|
|
||||||
## History
|
## 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-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-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
|
* 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 #515]: https://github.com/ossrs/srs/issues/515
|
||||||
[bug #511]: https://github.com/ossrs/srs/issues/511
|
[bug #511]: https://github.com/ossrs/srs/issues/511
|
||||||
[bug #518]: https://github.com/ossrs/srs/issues/518
|
[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
|
[bug #xxxxxxxxxx]: https://github.com/ossrs/srs/issues/xxxxxxxxxx
|
||||||
|
|
||||||
[exo #828]: https://github.com/google/ExoPlayer/pull/828
|
[exo #828]: https://github.com/google/ExoPlayer/pull/828
|
||||||
|
|
|
@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
// current release version
|
// current release version
|
||||||
#define VERSION_MAJOR 2
|
#define VERSION_MAJOR 2
|
||||||
#define VERSION_MINOR 0
|
#define VERSION_MINOR 0
|
||||||
#define VERSION_REVISION 201
|
#define VERSION_REVISION 202
|
||||||
|
|
||||||
// server info.
|
// server info.
|
||||||
#define RTMP_SIG_SRS_KEY "SRS"
|
#define RTMP_SIG_SRS_KEY "SRS"
|
||||||
|
|
|
@ -1514,10 +1514,17 @@ int SrsProtocol::on_recv_message(SrsCommonMessage* msg)
|
||||||
{
|
{
|
||||||
srs_warn("accept chunk size %d, but should in [%d, %d], "
|
srs_warn("accept chunk size %d, but should in [%d, %d], "
|
||||||
"@see: https://github.com/ossrs/srs/issues/160",
|
"@see: https://github.com/ossrs/srs/issues/160",
|
||||||
pkt->chunk_size, SRS_CONSTS_RTMP_MIN_CHUNK_SIZE,
|
pkt->chunk_size, SRS_CONSTS_RTMP_MIN_CHUNK_SIZE, SRS_CONSTS_RTMP_MAX_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;
|
in_chunk_size = pkt->chunk_size;
|
||||||
srs_trace("input chunk size to %d", pkt->chunk_size);
|
srs_trace("input chunk size to %d", pkt->chunk_size);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue