Browse Source

lavf/bit: Use pkt->size instead of a constant for G.729 frame size.

Makes the code more readable, the muxer may support variable bit-rate in the future.
tags/n3.4
Carl Eugen Hoyos 8 years ago
parent
commit
6f7bd8cd90
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      libavformat/bit.c

+ 3
- 3
libavformat/bit.c View File

@@ -143,10 +143,10 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt)
return AVERROR(EINVAL);

avio_wl16(pb, SYNC_WORD);
avio_wl16(pb, 8 * 10);
avio_wl16(pb, 8 * pkt->size);

init_get_bits(&gb, pkt->data, 8*10);
for(i=0; i< 8 * 10; i++)
init_get_bits(&gb, pkt->data, 8 * pkt->size);
for (i = 0; i < 8 * pkt->size; i++)
avio_wl16(pb, get_bits1(&gb) ? BIT_1 : BIT_0);

return 0;


Loading…
Cancel
Save