mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-17 20:17:55 +02:00
oggdec: fix memleak on header parsing failure
Fixes Ticket1931 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
99a30ad56d
commit
07a866282f
@ -57,6 +57,7 @@ static const struct ogg_codec * const ogg_codecs[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static int64_t ogg_calc_pts(AVFormatContext *s, int idx, int64_t *dts);
|
static int64_t ogg_calc_pts(AVFormatContext *s, int idx, int64_t *dts);
|
||||||
|
static int ogg_read_close(AVFormatContext *s);
|
||||||
|
|
||||||
//FIXME We could avoid some structure duplication
|
//FIXME We could avoid some structure duplication
|
||||||
static int ogg_save(AVFormatContext *s)
|
static int ogg_save(AVFormatContext *s)
|
||||||
@ -596,8 +597,10 @@ static int ogg_read_header(AVFormatContext *s)
|
|||||||
//linear headers seek from start
|
//linear headers seek from start
|
||||||
do {
|
do {
|
||||||
ret = ogg_packet(s, NULL, NULL, NULL, NULL);
|
ret = ogg_packet(s, NULL, NULL, NULL, NULL);
|
||||||
if (ret < 0)
|
if (ret < 0) {
|
||||||
|
ogg_read_close(s);
|
||||||
return ret;
|
return ret;
|
||||||
|
}
|
||||||
} while (!ogg->headers);
|
} while (!ogg->headers);
|
||||||
av_dlog(s, "found headers\n");
|
av_dlog(s, "found headers\n");
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user