X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Fassdec.c;h=8fb9e8e501bc77dc050ea40f05bb4f66b9e14b8e;hb=d92f38c179591a608390ffa9fee59c309142e79d;hp=d89c14e5b8e353c70a0406ec2625e3b22a5891ce;hpb=de33b3e457a656230fc6d544a1889218d77a5b3c;p=ffmpeg diff --git a/libavformat/assdec.c b/libavformat/assdec.c index d89c14e5b8e..8fb9e8e501b 100644 --- a/libavformat/assdec.c +++ b/libavformat/assdec.c @@ -33,7 +33,7 @@ typedef struct ASSContext { unsigned readorder; } ASSContext; -static int ass_probe(AVProbeData *p) +static int ass_probe(const AVProbeData *p) { char buf[13]; FFTextReader tr; @@ -160,6 +160,8 @@ static int ass_read_header(AVFormatContext *s) ff_subtitles_queue_finalize(s, &ass->q); end: + if (res < 0) + ass_read_close(s); av_bprint_finalize(&header, NULL); av_bprint_finalize(&line, NULL); av_bprint_finalize(&rline, NULL);