diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-09-27 14:13:41 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-09-27 14:13:41 +0400 |
commit | 72eddc10fa1f3ca7fb95292673fa26401f754c92 (patch) | |
tree | 878039cdab1f882bc68a9e60203e430d42eb8d54 /libavformat/rtmpproto.c | |
parent | 328a5b93d3a493d6a653a83c425fb2cc98e8f41b (diff) | |
parent | d872fb0f7ff2ff0ba87f5ccf6a1a55ca2be472c9 (diff) |
Merge commit 'd872fb0f7ff2ff0ba87f5ccf6a1a55ca2be472c9'
* commit 'd872fb0f7ff2ff0ba87f5ccf6a1a55ca2be472c9':
lavf: Reset the entry count and allocation size variables on av_reallocp failures
Conflicts:
libavformat/avienc.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/rtmpproto.c')
-rw-r--r-- | libavformat/rtmpproto.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c index 2b29a9326c..9bccd92088 100644 --- a/libavformat/rtmpproto.c +++ b/libavformat/rtmpproto.c @@ -156,8 +156,11 @@ 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 * - sizeof(*rt->tracked_methods))) < 0) + sizeof(*rt->tracked_methods))) < 0) { + rt->nb_tracked_methods = 0; + rt->tracked_methods_size = 0; return err; + } } rt->tracked_methods[rt->nb_tracked_methods].name = av_strdup(name); |