Mercurial > libavformat.hg
comparison swfenc.c @ 4873:1800b33b2c15 libavformat
Rename pbBufPtr() to put_bits_ptr().
The new name is more readable and consistent with the FFmpeg naming
style.
author | stefano |
---|---|
date | Mon, 13 Apr 2009 16:59:38 +0000 |
parents | 7aa7c5853bb6 |
children | 41d709e71f5f |
comparison
equal
deleted
inserted
replaced
4872:304a0ea063f0 | 4873:1800b33b2c15 |
---|---|
100 put_bits(&p, nbits, xmax & mask); | 100 put_bits(&p, nbits, xmax & mask); |
101 put_bits(&p, nbits, ymin & mask); | 101 put_bits(&p, nbits, ymin & mask); |
102 put_bits(&p, nbits, ymax & mask); | 102 put_bits(&p, nbits, ymax & mask); |
103 | 103 |
104 flush_put_bits(&p); | 104 flush_put_bits(&p); |
105 put_buffer(pb, buf, pbBufPtr(&p) - p.buf); | 105 put_buffer(pb, buf, put_bits_ptr(&p) - p.buf); |
106 } | 106 } |
107 | 107 |
108 static void put_swf_line_edge(PutBitContext *pb, int dx, int dy) | 108 static void put_swf_line_edge(PutBitContext *pb, int dx, int dy) |
109 { | 109 { |
110 int nbits, mask; | 110 int nbits, mask; |
165 put_bits(&p, 5, nbits); /* nb bits */ | 165 put_bits(&p, 5, nbits); /* nb bits */ |
166 put_bits(&p, nbits, tx); | 166 put_bits(&p, nbits, tx); |
167 put_bits(&p, nbits, ty); | 167 put_bits(&p, nbits, ty); |
168 | 168 |
169 flush_put_bits(&p); | 169 flush_put_bits(&p); |
170 put_buffer(pb, buf, pbBufPtr(&p) - p.buf); | 170 put_buffer(pb, buf, put_bits_ptr(&p) - p.buf); |
171 } | 171 } |
172 | 172 |
173 static int swf_write_header(AVFormatContext *s) | 173 static int swf_write_header(AVFormatContext *s) |
174 { | 174 { |
175 SWFContext *swf = s->priv_data; | 175 SWFContext *swf = s->priv_data; |
291 /* end of shape */ | 291 /* end of shape */ |
292 put_bits(&p, 1, 0); /* not an edge */ | 292 put_bits(&p, 1, 0); /* not an edge */ |
293 put_bits(&p, 5, 0); | 293 put_bits(&p, 5, 0); |
294 | 294 |
295 flush_put_bits(&p); | 295 flush_put_bits(&p); |
296 put_buffer(pb, buf1, pbBufPtr(&p) - p.buf); | 296 put_buffer(pb, buf1, put_bits_ptr(&p) - p.buf); |
297 | 297 |
298 put_swf_end_tag(s); | 298 put_swf_end_tag(s); |
299 } | 299 } |
300 | 300 |
301 if (swf->audio_enc && swf->audio_enc->codec_id == CODEC_ID_MP3) { | 301 if (swf->audio_enc && swf->audio_enc->codec_id == CODEC_ID_MP3) { |