Changeset 2499

Show
Ignore:
Timestamp:
05/13/99 08:01:57 (15 years ago)
Author:
ucacoxh
Message:

- Redundancy decoder bugs found because of precedence bug. Original
precedence was correct, redundancy unit fragmentation was slightly
broken. Need to listen to this to convince myself it works, but
timestamps I used for debugging fragmentation and buffer placement
everything appears hunky-dory.

The used to be a game for the beeb called hunky-dory if my memory
serves me in any way this hangover morning.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • rat/trunk/cc_rdncy.c

    r2497 r2499  
    681681place_unit(media_data *md, coded_unit *cu) 
    682682{ 
     683#ifdef DEBUG_REDUNDANCY 
     684        const codec_format_t *cf; 
     685        cf = codec_get_format(cu->id); 
     686        debug_msg("%d %s\n", md->nrep, cf->long_name); 
     687#endif /* DEBUG_REDUNDANCY */ 
    683688        assert(md->nrep < MAX_MEDIA_UNITS); 
    684         if (md->nrep) { 
    685                 memmove(md->rep + 1, md->rep, sizeof(md->rep[0]) * md->nrep); 
    686         } 
    687         md->rep[0] = cu; 
     689        md->rep[md->nrep] = cu; 
    688690        md->nrep++; 
    689691} 
     
    776778                memcpy(cu->data, p, cu->data_len); 
    777779                p += cu->data_len; 
    778  
    779780                md = red_media_data_create_or_get(out, playout); 
    780  
    781781                if (md->nrep == MAX_MEDIA_UNITS) continue; 
    782  
    783782                place_unit(md, cu); 
    784                  
    785783                playout = ts_add(playout, step); 
    786784        } 
     
    842840                this_playout = ts_add(playout, ts_max_off); 
    843841                this_playout = ts_sub(this_playout, ts_blk_off); 
    844  
    845842                hp += 4; /* hdr */ 
    846                 red_split_unit(ppt, bpt, dp, blen, playout, out); 
     843                red_split_unit(ppt, bpt, dp, blen, this_playout, out); 
    847844                xmemchk(); 
    848845                dp += blen; 
     
    852849        this_playout = ts_add(playout, ts_max_off); 
    853850        hp += 1; 
    854         red_split_unit(ppt, ppt, dp, blen, playout, out); 
     851        blen = (u_int32) (de - dp); 
     852        red_split_unit(ppt, ppt, dp, blen, this_playout, out); 
    855853        xmemchk(); 
    856854}