X-Git-Url: https://git.piment-noir.org/?p=deb_ffmpeg.git;a=blobdiff_plain;f=ffmpeg%2Flibavformat%2Fjacosubdec.c;fp=ffmpeg%2Flibavformat%2Fjacosubdec.c;h=1ca005587746cb3c63e864ab964deab96032d27d;hp=9a288701a6fd3f10bfc71edc8f154f6ee9af8ea9;hb=f6fa7814ccfe3e76514b36cf04f5cd3cb657c8cf;hpb=2ba45a602cbfa7b771effba9b11bb4245c21bc00 diff --git a/ffmpeg/libavformat/jacosubdec.c b/ffmpeg/libavformat/jacosubdec.c index 9a28870..1ca0055 100644 --- a/ffmpeg/libavformat/jacosubdec.c +++ b/ffmpeg/libavformat/jacosubdec.c @@ -232,7 +232,7 @@ static int jacosub_read_header(AVFormatContext *s) /* general/essential directives in the extradata */ ret = avpriv_bprint_to_extradata(st->codec, &header); if (ret < 0) - return ret; + goto fail; /* SHIFT and TIMERES affect the whole script so packet timing can only be * done in a second pass */ @@ -243,6 +243,9 @@ static int jacosub_read_header(AVFormatContext *s) ff_subtitles_queue_finalize(&jacosub->q); return 0; +fail: + jacosub_read_close(s); + return ret; } static int jacosub_read_packet(AVFormatContext *s, AVPacket *pkt)