]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/sccdec.c
avformat: Constify all muxer/demuxers
[ffmpeg] / libavformat / sccdec.c
index 645e52857b96d842074d565739e0eae1fd006803..5ad21a1f8bb3560df773ec87c3c089b6c61738e1 100644 (file)
@@ -65,7 +65,6 @@ static int scc_read_header(AVFormatContext *s)
     AVStream *st = avformat_new_stream(s, NULL);
     char line2[4096], line[4096];
     int64_t pos, ts, next_ts = AV_NOPTS_VALUE;
-    int ret = 0;
     ptrdiff_t len;
     uint8_t out[4096];
     FFTextReader tr;
@@ -94,7 +93,7 @@ static int scc_read_header(AVFormatContext *s)
                     break;
             }
 
-            ts = (hh * 3600LL + mm * 60LL + ss) * 1000LL + fs * 33;
+            ts = (hh * 3600LL + mm * 60LL + ss) * 1000LL + fs * 33LL;
 
             while (!ff_text_eof(&tr)) {
                 len = ff_subtitles_read_line(&tr, line2, sizeof(line2));
@@ -118,7 +117,7 @@ static int scc_read_header(AVFormatContext *s)
             }
         }
 
-        next_ts = (hh * 3600LL + mm * 60LL + ss) * 1000LL + fs * 33;
+        next_ts = (hh * 3600LL + mm * 60LL + ss) * 1000LL + fs * 33LL;
 
         pos = ff_text_pos(&tr);
         lline = (char *)&line;
@@ -175,7 +174,7 @@ static int scc_read_header(AVFormatContext *s)
 
     ff_subtitles_queue_finalize(s, &scc->q);
 
-    return ret;
+    return 0;
 fail:
     ff_subtitles_queue_clean(&scc->q);
     return AVERROR(ENOMEM);
@@ -202,7 +201,7 @@ static int scc_read_close(AVFormatContext *s)
     return 0;
 }
 
-AVInputFormat ff_scc_demuxer = {
+const AVInputFormat ff_scc_demuxer = {
     .name           = "scc",
     .long_name      = NULL_IF_CONFIG_SMALL("Scenarist Closed Captions"),
     .priv_data_size = sizeof(SCCContext),