mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
increase the nb_samples because some large video may overflow.
This commit is contained in:
parent
3fe338d1c5
commit
2ef1ef06e9
2 changed files with 7 additions and 5 deletions
|
@ -353,10 +353,9 @@ int SrsCodecSample::add_sample_unit(char* bytes, int size)
|
||||||
{
|
{
|
||||||
int ret = ERROR_SUCCESS;
|
int ret = ERROR_SUCCESS;
|
||||||
|
|
||||||
if (nb_sample_units >= SRS_SRS_MAX_CODEC_SAMPLE) {
|
if (nb_sample_units >= SRS_MAX_CODEC_SAMPLE) {
|
||||||
ret = ERROR_HLS_DECODE_ERROR;
|
ret = ERROR_HLS_DECODE_ERROR;
|
||||||
srs_error("hls decode samples error, "
|
srs_error("avc exceed samples count, max=%d, video=%d. ret=%d", SRS_MAX_CODEC_SAMPLE, is_video, ret);
|
||||||
"exceed the max count: %d, ret=%d", SRS_SRS_MAX_CODEC_SAMPLE, ret);
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -243,9 +243,12 @@ extern int flv_sample_rates[];
|
||||||
*/
|
*/
|
||||||
extern int aac_sample_rates[];
|
extern int aac_sample_rates[];
|
||||||
|
|
||||||
#define SRS_SRS_MAX_CODEC_SAMPLE 128
|
// The impossible aac sample rate index.
|
||||||
#define SRS_AAC_SAMPLE_RATE_UNSET 15
|
#define SRS_AAC_SAMPLE_RATE_UNSET 15
|
||||||
|
|
||||||
|
// The max number of NALUs in a video, or aac frame in audio packet.
|
||||||
|
#define SRS_MAX_CODEC_SAMPLE 256
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the FLV/RTMP supported audio sample size.
|
* the FLV/RTMP supported audio sample size.
|
||||||
* Size of each audio sample. This parameter only pertains to
|
* Size of each audio sample. This parameter only pertains to
|
||||||
|
@ -368,7 +371,7 @@ public:
|
||||||
* where avc/h264 video packet may contains multiple buffer.
|
* where avc/h264 video packet may contains multiple buffer.
|
||||||
*/
|
*/
|
||||||
int nb_sample_units;
|
int nb_sample_units;
|
||||||
SrsCodecSampleUnit sample_units[SRS_SRS_MAX_CODEC_SAMPLE];
|
SrsCodecSampleUnit sample_units[SRS_MAX_CODEC_SAMPLE];
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* whether the sample is video sample which demux from video packet.
|
* whether the sample is video sample which demux from video packet.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue