(in->i_pts > 0 ? in->i_pts : in->i_dts) );
/* Payload header */
out->p_buffer[12] = 0xF0; /* CMR */
- out->p_buffer[13] = 0x00; /* ToC */ /* FIXME: frame type */
+ out->p_buffer[13] = p_data[0]&0x7C; /* ToC */ /* FIXME: frame type */
/* FIXME: are we fed multiple frames ? */
- memcpy( &out->p_buffer[14], p_data, i_payload );
+ memcpy( &out->p_buffer[14], p_data+1, i_payload-1 );
- out->i_buffer = 14 + i_payload;
+ out->i_buffer = 14 + i_payload-1;
out->i_dts = in->i_dts + i * in->i_length / i_count;
out->i_length = in->i_length / i_count;