[SCM] libav/experimental: Fix probe & demuxing of Topfield 58XXPVR and 68XXPVR (topfield.rec)

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 16:36:48 UTC 2013


The following commit has been merged in the experimental branch:
commit 1558d0b9103394d7d7ca1eb41b1e85647e4d1cce
Author: Michael Niedermayer <michaelni at gmx.at>
Date:   Tue Feb 3 11:01:57 2009 +0000

    Fix probe & demuxing of Topfield 58XXPVR and 68XXPVR (topfield.rec)
    
    Originally committed as revision 16968 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index 5d07e39..e335bc6 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -1177,14 +1177,15 @@ static int mpegts_probe(AVProbeData *p)
 #if 1
     const int size= p->buf_size;
     int score, fec_score, dvhs_score;
+    int check_count= size / TS_FEC_PACKET_SIZE;
 #define CHECK_COUNT 10
 
-    if (size < (TS_FEC_PACKET_SIZE * CHECK_COUNT))
+    if (check_count < CHECK_COUNT)
         return -1;
 
-    score    = analyze(p->buf, TS_PACKET_SIZE    *CHECK_COUNT, TS_PACKET_SIZE, NULL);
-    dvhs_score  = analyze(p->buf, TS_DVHS_PACKET_SIZE    *CHECK_COUNT, TS_DVHS_PACKET_SIZE, NULL);
-    fec_score= analyze(p->buf, TS_FEC_PACKET_SIZE*CHECK_COUNT, TS_FEC_PACKET_SIZE, NULL);
+    score     = analyze(p->buf, TS_PACKET_SIZE     *check_count, TS_PACKET_SIZE     , NULL)*CHECK_COUNT/check_count;
+    dvhs_score= analyze(p->buf, TS_DVHS_PACKET_SIZE*check_count, TS_DVHS_PACKET_SIZE, NULL)*CHECK_COUNT/check_count;
+    fec_score = analyze(p->buf, TS_FEC_PACKET_SIZE *check_count, TS_FEC_PACKET_SIZE , NULL)*CHECK_COUNT/check_count;
 //    av_log(NULL, AV_LOG_DEBUG, "score: %d, dvhs_score: %d, fec_score: %d \n", score, dvhs_score, fec_score);
 
 // we need a clear definition for the returned score otherwise things will become messy sooner or later
@@ -1235,7 +1236,7 @@ static int mpegts_read_header(AVFormatContext *s,
 {
     MpegTSContext *ts = s->priv_data;
     ByteIOContext *pb = s->pb;
-    uint8_t buf[1024];
+    uint8_t buf[5*1024];
     int len;
     int64_t pos;
 

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list