]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/sapdec.c
mpc8: Check return value of avio_seek and avoid modifying state if it fails
[ffmpeg] / libavformat / sapdec.c
index 6ac7bfd484c7f0af87869f8517203599e06845e1..f0f592e1fb10ef8b62062708a2e104c02f74bc62 100644 (file)
@@ -52,7 +52,7 @@ static int sap_read_close(AVFormatContext *s)
 {
     struct SAPState *sap = s->priv_data;
     if (sap->sdp_ctx)
-        av_close_input_file(sap->sdp_ctx);
+        avformat_close_input(&sap->sdp_ctx);
     if (sap->ann_fd)
         ffurl_close(sap->ann_fd);
     av_freep(&sap->sdp);
@@ -60,8 +60,7 @@ static int sap_read_close(AVFormatContext *s)
     return 0;
 }
 
-static int sap_read_header(AVFormatContext *s,
-                           AVFormatParameters *ap)
+static int sap_read_header(AVFormatContext *s)
 {
     struct SAPState *sap = s->priv_data;
     char host[1024], path[1024], url[1024];
@@ -237,4 +236,3 @@ AVInputFormat ff_sap_demuxer = {
     .read_close     = sap_read_close,
     .flags = AVFMT_NOFILE,
 };
-