diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2016-10-28 20:21:21 +0300 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2016-11-07 21:27:40 +0300 |
commit | ecb40dee3284393c5adb760515ecba668db282da (patch) | |
tree | 5ca5a9175768c2da9f3ebb432708d7f16afd602c /ffserver.c | |
parent | 10019c13e003b2ef4857d78ee980f796f6379252 (diff) |
ffserver: eliminate hardcoded literal and duplicated array size
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'ffserver.c')
-rw-r--r-- | ffserver.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ffserver.c b/ffserver.c index 686c12b2de..18857cc389 100644 --- a/ffserver.c +++ b/ffserver.c @@ -2993,10 +2993,11 @@ static int prepare_sdp_description(FFServerStream *stream, uint8_t **pbuffer, avcodec_parameters_from_context(stream->streams[i]->codecpar, stream->streams[i]->codec); avc->streams[i]->codecpar = stream->streams[i]->codecpar; } - *pbuffer = av_mallocz(2048); +#define PBUFFER_SIZE 2048 + *pbuffer = av_mallocz(PBUFFER_SIZE); if (!*pbuffer) goto sdp_done; - av_sdp_create(&avc, 1, *pbuffer, 2048); + av_sdp_create(&avc, 1, *pbuffer, PBUFFER_SIZE); sdp_done: av_freep(&avc->streams); |