Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <ceffmpeg@gmail.com>2017-09-29 19:46:44 +0300
committerCarl Eugen Hoyos <ceffmpeg@gmail.com>2017-09-29 19:46:44 +0300
commit6f7bd8cd90de3c970d1d73a29ac5749ffe2e2f95 (patch)
treed76bb27fd6017ecb29f2877290f2adafe08d8ea9 /libavformat/bit.c
parent44bdb88811a40673aaef5f82e63705857bd0bfe6 (diff)
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.
Diffstat (limited to 'libavformat/bit.c')
-rw-r--r--libavformat/bit.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/bit.c b/libavformat/bit.c
index c703412f1c..d742a5b363 100644
--- a/libavformat/bit.c
+++ b/libavformat/bit.c
@@ -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;