mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-21 22:36:59 +00:00
avformat/rtmpproto: use av_reallocp_array()
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
This commit is contained in:
parent
1a94456390
commit
fa21df2bd4
@ -163,7 +163,7 @@ static int add_tracked_method(RTMPContext *rt, const char *name, int id)
|
||||
|
||||
if (rt->nb_tracked_methods + 1 > rt->tracked_methods_size) {
|
||||
rt->tracked_methods_size = (rt->nb_tracked_methods + 1) * 2;
|
||||
if ((err = av_reallocp(&rt->tracked_methods, rt->tracked_methods_size *
|
||||
if ((err = av_reallocp_array(&rt->tracked_methods, rt->tracked_methods_size,
|
||||
sizeof(*rt->tracked_methods))) < 0) {
|
||||
rt->nb_tracked_methods = 0;
|
||||
rt->tracked_methods_size = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user