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/rdt.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/rdt.c')
-rw-r--r-- | libavformat/rdt.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/rdt.c b/libavformat/rdt.c index e3de5cac63..3901e21f1c 100644 --- a/libavformat/rdt.c +++ b/libavformat/rdt.c @@ -423,8 +423,10 @@ rdt_parse_sdp_line (AVFormatContext *s, int st_index, if (first == -1) first = n; if (rdt->nb_rmst < count) { if ((err = av_reallocp(&rdt->rmst, - count * sizeof(*rdt->rmst))) < 0) + count * sizeof(*rdt->rmst))) < 0) { + rdt->nb_rmst = 0; return err; + } memset(rdt->rmst + rdt->nb_rmst, 0, (count - rdt->nb_rmst) * sizeof(*rdt->rmst)); rdt->nb_rmst = count; |