to prevent possible memory leaks
---
libavformat/asfdec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c
index 18e4d7f..1a6aaea 100644
--- a/libavformat/asfdec.c
+++ b/libavformat/asfdec.c
@@ -746,6 +746,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;
@@ -786,7 +787,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;
--
2.0.1
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel