OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ee80f83
)
asfdec: increment nb_streams right after the stream allocation
author
Alexandra Hájková
<alexandra.khirnova@gmail.com>
Thu, 23 Jul 2015 06:59:53 +0000
(08:59 +0200)
committer
Anton Khirnov
<anton@khirnov.net>
Thu, 23 Jul 2015 07:48:26 +0000
(09:48 +0200)
to prevent possible memory leaks
Signed-off-by: Anton Khirnov <anton@khirnov.net>
libavformat/asfdec.c
patch
|
blob
|
history
diff --git
a/libavformat/asfdec.c
b/libavformat/asfdec.c
index
305c01c
..
d9e9a5a
100644
(file)
--- a/
libavformat/asfdec.c
+++ b/
libavformat/asfdec.c
@@
-745,6
+745,7
@@
static int asf_read_stream_properties(AVFormatContext *s, const GUIDParseTable *
if (!asf->asf_st[asf->nb_streams])
return AVERROR(ENOMEM);
asf_st = asf->asf_st[asf->nb_streams];
+ asf->nb_streams++;
asf_st->stream_index = stream_index;
asf_st->index = st->index;
asf_st->indexed = 0;
@@
-785,7
+786,6
@@
static int asf_read_stream_properties(AVFormatContext *s, const GUIDParseTable *
avio_skip(pb, err_data_len);
}
- asf->nb_streams++;
align_position(pb, asf->offset, size);
return 0;