diff options
author | Luca Barbato <lu_zero@gentoo.org> | 2013-01-04 16:05:51 +0100 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2013-01-06 17:59:54 +0100 |
commit | d894f74762bc95310ba23f804b7ba8dffc8f6646 (patch) | |
tree | 6649c492be75bd2ce653d10c0932bc92de0a801d /libavformat/oggparsevorbis.c | |
parent | 89b51b570daa80e6e3790fcd449fe61fc5574e07 (diff) | |
download | ffmpeg-d894f74762bc95310ba23f804b7ba8dffc8f6646.tar.gz |
oggdec: make sure the private parse data is cleaned up
Diffstat (limited to 'libavformat/oggparsevorbis.c')
-rw-r--r-- | libavformat/oggparsevorbis.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libavformat/oggparsevorbis.c b/libavformat/oggparsevorbis.c index 396a3e3ea7..fbe6c4fb41 100644 --- a/libavformat/oggparsevorbis.c +++ b/libavformat/oggparsevorbis.c @@ -192,6 +192,16 @@ fixup_vorbis_headers(AVFormatContext * as, struct oggvorbis_private *priv, return offset; } +static int vorbis_cleanup(AVFormatContext *s, int idx) +{ + struct ogg *ogg = s->priv_data; + struct ogg_stream *os = ogg->streams + idx; + struct oggvorbis_private *priv = os->private; + int i; + if (os->private) + for (i = 0; i < 3; i++) + av_freep(&priv->packet[i]); +} static int vorbis_header (AVFormatContext * s, int idx) @@ -359,5 +369,6 @@ const struct ogg_codec ff_vorbis_codec = { .magicsize = 7, .header = vorbis_header, .packet = vorbis_packet, + .cleanup= vorbis_cleanup, .nb_header = 3, }; |