Compare commits

...

2 Commits

Author SHA1 Message Date
Michael Niedermayer
076a8dfd41 rtpdec_asf: fix memleak
Based on a suggestion by Ronald S. Bultje
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit a2b66a366d)
2011-09-07 16:57:24 +02:00
Michael Niedermayer
a9a8e5ca99 Update for 0.8.3
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-07 15:27:03 +02:00
4 changed files with 9 additions and 5 deletions

View File

@@ -31,7 +31,7 @@ PROJECT_NAME = FFmpeg
# This could be handy for archiving the generated documentation or # This could be handy for archiving the generated documentation or
# if some version control system is used. # if some version control system is used.
PROJECT_NUMBER = 0.8.2 PROJECT_NUMBER = 0.8.3
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
# base path where the generated documentation will be put. # base path where the generated documentation will be put.

View File

@@ -1 +1 @@
0.8.2 0.8.3

View File

@@ -1 +1 @@
0.8.2 0.8.3

View File

@@ -233,10 +233,14 @@ static int asfrtp_parse_packet(AVFormatContext *s, PayloadContext *asf,
int cur_len = start_off + len_off - off; int cur_len = start_off + len_off - off;
int prev_len = out_len; int prev_len = out_len;
void *newbuf;
out_len += cur_len; out_len += cur_len;
asf->buf = av_realloc(asf->buf, out_len); if(FFMIN(cur_len, len - off)<0)
if(!asf->buf || FFMIN(cur_len, len - off)<0)
return -1; return -1;
newbuf = av_realloc(asf->buf, out_len);
if(!newbuf)
return -1;
asf->buf= newbuf;
memcpy(asf->buf + prev_len, buf + off, memcpy(asf->buf + prev_len, buf + off,
FFMIN(cur_len, len - off)); FFMIN(cur_len, len - off));
avio_skip(pb, cur_len); avio_skip(pb, cur_len);