Patent attributes
Buffering packets of a media stream for transmission from a transmitting device to a receiving device. Media packets are formed from at least one kind of media information in a stream generator; forward error correction data is formed on the basis of the media packets; one or more repair packets are formed on the basis of the forward error correction data; and a transmission schedule is generated for packets to be transmitted. In addition, hypothetical decoding is also performed according to the transmission schedule. The hypothetical decoding comprises buffering the packets to be transmitted according to the transmission schedule to a hypothetical decoding buffer; and controlling the buffer occupancy level of the hypothetical decoding buffer by controlling the operation of the stream generator.