[FFmpeg-cvslog] avformat/mpegts: Remove unused argument from analyze()

Michael Niedermayer git at videolan.org
Sun Apr 10 13:34:06 CEST 2016


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sun Apr 10 13:18:17 2016 +0200| [38a6242b271fad4917a1c6201ff61e10160c965b] | committer: Michael Niedermayer

avformat/mpegts: Remove unused argument from analyze()

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=38a6242b271fad4917a1c6201ff61e10160c965b
---

 libavformat/mpegts.c |   16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index 772fe47..dbec255 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -531,7 +531,7 @@ static void mpegts_close_filter(MpegTSContext *ts, MpegTSFilter *filter)
     ts->pids[pid] = NULL;
 }
 
-static int analyze(const uint8_t *buf, int size, int packet_size, int *index,
+static int analyze(const uint8_t *buf, int size, int packet_size,
                    int probe)
 {
     int stat[TS_MAX_PACKET_SIZE];
@@ -549,8 +549,6 @@ static int analyze(const uint8_t *buf, int size, int packet_size, int *index,
             stat_all++;
             if (stat[x] > best_score) {
                 best_score = stat[x];
-                if (index)
-                    *index = x;
             }
         }
     }
@@ -566,9 +564,9 @@ static int get_packet_size(const uint8_t *buf, int size)
     if (size < (TS_FEC_PACKET_SIZE * 5 + 1))
         return AVERROR_INVALIDDATA;
 
-    score      = analyze(buf, size, TS_PACKET_SIZE,      NULL, 0);
-    dvhs_score = analyze(buf, size, TS_DVHS_PACKET_SIZE, NULL, 0);
-    fec_score  = analyze(buf, size, TS_FEC_PACKET_SIZE,  NULL, 0);
+    score      = analyze(buf, size, TS_PACKET_SIZE,      0);
+    dvhs_score = analyze(buf, size, TS_DVHS_PACKET_SIZE, 0);
+    fec_score  = analyze(buf, size, TS_FEC_PACKET_SIZE,  0);
     av_log(NULL, AV_LOG_TRACE, "score: %d, dvhs_score: %d, fec_score: %d \n",
             score, dvhs_score, fec_score);
 
@@ -2463,9 +2461,9 @@ static int mpegts_probe(AVProbeData *p)
 
     for (i = 0; i<check_count; i+=CHECK_BLOCK) {
         int left = FFMIN(check_count - i, CHECK_BLOCK);
-        int score      = analyze(p->buf + TS_PACKET_SIZE     *i, TS_PACKET_SIZE     *left, TS_PACKET_SIZE     , NULL, 1);
-        int dvhs_score = analyze(p->buf + TS_DVHS_PACKET_SIZE*i, TS_DVHS_PACKET_SIZE*left, TS_DVHS_PACKET_SIZE, NULL, 1);
-        int fec_score  = analyze(p->buf + TS_FEC_PACKET_SIZE *i, TS_FEC_PACKET_SIZE *left, TS_FEC_PACKET_SIZE , NULL, 1);
+        int score      = analyze(p->buf + TS_PACKET_SIZE     *i, TS_PACKET_SIZE     *left, TS_PACKET_SIZE     , 1);
+        int dvhs_score = analyze(p->buf + TS_DVHS_PACKET_SIZE*i, TS_DVHS_PACKET_SIZE*left, TS_DVHS_PACKET_SIZE, 1);
+        int fec_score  = analyze(p->buf + TS_FEC_PACKET_SIZE *i, TS_FEC_PACKET_SIZE *left, TS_FEC_PACKET_SIZE , 1);
         score = FFMAX3(score, dvhs_score, fec_score);
         sumscore += score;
         maxscore = FFMAX(maxscore, score);



More information about the ffmpeg-cvslog mailing list