]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Fix incorrect MPA frame size computation (when padding was enabled)
authorAndreas Öman <andreas@lonelycoder.com>
Wed, 30 Jun 2010 20:31:26 +0000 (20:31 +0000)
committerAndreas Öman <andreas@lonelycoder.com>
Wed, 30 Jun 2010 20:31:26 +0000 (20:31 +0000)
src/parsers.c

index 7e2f62117fb63f396320f6d32862caaf5daae70b..cd5db4ed30151f877dc69b3dbae13f266dc00ec4 100644 (file)
@@ -499,7 +499,7 @@ parse_mpa(th_transport_t *t, th_stream_t *st, size_t ilen,
     if(mpa_valid_frame(buf + i)) {
       int br = mpa_br[ buf[i+2] >> 4     ];
       int sr = mpa_sr[(buf[i+2] >> 2) & 3];
-      int pad = buf[i+2] & 1;
+      int pad =       (buf[i+2] >> 1) & 1;
       
       if(br && sr) {
        int fsize = 144000 * br / sr + pad;