]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/samidec.c
fftools/cmdutils: also print warnings when using -sinks and -sources
[ffmpeg] / libavformat / samidec.c
index 7ea1bdfdd97e3166b851c5151bf90d8edd7b3995..3070ef9bacf5e8fe404cb29beb5e506a2449a4be 100644 (file)
@@ -36,7 +36,7 @@ typedef struct {
     FFDemuxSubtitlesQueue q;
 } SAMIContext;
 
-static int sami_probe(AVProbeData *p)
+static int sami_probe(const AVProbeData *p)
 {
     char buf[6];
     FFTextReader tr;
@@ -108,6 +108,8 @@ static int sami_read_header(AVFormatContext *s)
     ff_subtitles_queue_finalize(s, &sami->q);
 
 end:
+    if (res < 0)
+        ff_subtitles_queue_clean(&sami->q);
     av_bprint_finalize(&buf, NULL);
     return res;
 }