Skip to content
Snippets Groups Projects
Commit 6f7bd8cd authored by Carl Eugen Hoyos's avatar Carl Eugen Hoyos
Browse files

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.
parent 44bdb888
No related branches found
No related tags found
No related merge requests found
...@@ -143,10 +143,10 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt) ...@@ -143,10 +143,10 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt)
return AVERROR(EINVAL); return AVERROR(EINVAL);
avio_wl16(pb, SYNC_WORD); avio_wl16(pb, SYNC_WORD);
avio_wl16(pb, 8 * 10); avio_wl16(pb, 8 * pkt->size);
init_get_bits(&gb, pkt->data, 8*10); init_get_bits(&gb, pkt->data, 8 * pkt->size);
for(i=0; i< 8 * 10; i++) for (i = 0; i < 8 * pkt->size; i++)
avio_wl16(pb, get_bits1(&gb) ? BIT_1 : BIT_0); avio_wl16(pb, get_bits1(&gb) ? BIT_1 : BIT_0);
return 0; return 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment