Browse Source

avformat/assdec: make sure to free allocated data in case of error

tags/n2.5
Clément Bœsch 11 years ago
parent
commit
71f6275169
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      libavformat/assdec.c

+ 3
- 3
libavformat/assdec.c View File

@@ -148,9 +148,6 @@ static int ass_read_header(AVFormatContext *s)
sub->duration = duration; sub->duration = duration;
} }


av_bprint_finalize(&line, NULL);
av_bprint_finalize(&rline, NULL);

res = avpriv_bprint_to_extradata(st->codec, &header); res = avpriv_bprint_to_extradata(st->codec, &header);
if (res < 0) if (res < 0)
goto end; goto end;
@@ -158,6 +155,9 @@ static int ass_read_header(AVFormatContext *s)
ff_subtitles_queue_finalize(&ass->q); ff_subtitles_queue_finalize(&ass->q);


end: end:
av_bprint_finalize(&header, NULL);
av_bprint_finalize(&line, NULL);
av_bprint_finalize(&rline, NULL);
return res; return res;
} }




Loading…
Cancel
Save