mirror of https://git.ffmpeg.org/ffmpeg.git
avformat/oggdec: favor av_freep() over av_free()
Found-by: Reimar Döffinger Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
838f461b07
commit
6838e1f547
|
@ -99,7 +99,7 @@ static int ogg_restore(AVFormatContext *s, int discard)
|
||||||
if (!discard) {
|
if (!discard) {
|
||||||
|
|
||||||
for (i = 0; i < ogg->nstreams; i++)
|
for (i = 0; i < ogg->nstreams; i++)
|
||||||
av_free(ogg->streams[i].buf);
|
av_freep(&ogg->streams[i].buf);
|
||||||
|
|
||||||
avio_seek(bc, ost->pos, SEEK_SET);
|
avio_seek(bc, ost->pos, SEEK_SET);
|
||||||
ogg->page_pos = -1;
|
ogg->page_pos = -1;
|
||||||
|
@ -633,14 +633,14 @@ static int ogg_read_close(AVFormatContext *s)
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < ogg->nstreams; i++) {
|
for (i = 0; i < ogg->nstreams; i++) {
|
||||||
av_free(ogg->streams[i].buf);
|
av_freep(&ogg->streams[i].buf);
|
||||||
if (ogg->streams[i].codec &&
|
if (ogg->streams[i].codec &&
|
||||||
ogg->streams[i].codec->cleanup) {
|
ogg->streams[i].codec->cleanup) {
|
||||||
ogg->streams[i].codec->cleanup(s, i);
|
ogg->streams[i].codec->cleanup(s, i);
|
||||||
}
|
}
|
||||||
av_free(ogg->streams[i].private);
|
av_freep(&ogg->streams[i].private);
|
||||||
}
|
}
|
||||||
av_free(ogg->streams);
|
av_freep(&ogg->streams);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue