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/smoothstreamingenc.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/smoothstreamingenc.c')
-rw-r--r-- | libavformat/smoothstreamingenc.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavformat/smoothstreamingenc.c b/libavformat/smoothstreamingenc.c index b47f00cd14..fe18a95e48 100644 --- a/libavformat/smoothstreamingenc.c +++ b/libavformat/smoothstreamingenc.c @@ -458,8 +458,11 @@ static int add_fragment(OutputStream *os, const char *file, const char *infofile if (os->nb_fragments >= os->fragments_size) { os->fragments_size = (os->fragments_size + 1) * 2; if ((err = av_reallocp(&os->fragments, sizeof(*os->fragments) * - os->fragments_size)) < 0) + os->fragments_size)) < 0) { + os->fragments_size = 0; + os->nb_fragments = 0; return err; + } } frag = av_mallocz(sizeof(*frag)); if (!frag) |