Commit eb0d04c3 authored by Reimar Döffinger's avatar Reimar Döffinger

Use ff_put_string in vorbis encoder.

Originally committed as revision 20095 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 00312109
...@@ -530,8 +530,7 @@ static int put_main_header(vorbis_enc_context *venc, uint8_t **out) ...@@ -530,8 +530,7 @@ static int put_main_header(vorbis_enc_context *venc, uint8_t **out)
// identification header // identification header
init_put_bits(&pb, p, buffer_len); init_put_bits(&pb, p, buffer_len);
put_bits(&pb, 8, 1); //magic put_bits(&pb, 8, 1); //magic
for (i = 0; "vorbis"[i]; i++) ff_put_string(&pb, "vorbis", 0);
put_bits(&pb, 8, "vorbis"[i]);
put_bits(&pb, 32, 0); // version put_bits(&pb, 32, 0); // version
put_bits(&pb, 8, venc->channels); put_bits(&pb, 8, venc->channels);
put_bits(&pb, 32, venc->sample_rate); put_bits(&pb, 32, venc->sample_rate);
...@@ -550,8 +549,7 @@ static int put_main_header(vorbis_enc_context *venc, uint8_t **out) ...@@ -550,8 +549,7 @@ static int put_main_header(vorbis_enc_context *venc, uint8_t **out)
// comment header // comment header
init_put_bits(&pb, p, buffer_len); init_put_bits(&pb, p, buffer_len);
put_bits(&pb, 8, 3); //magic put_bits(&pb, 8, 3); //magic
for (i = 0; "vorbis"[i]; i++) ff_put_string(&pb, "vorbis", 0);
put_bits(&pb, 8, "vorbis"[i]);
put_bits(&pb, 32, 0); // vendor length TODO put_bits(&pb, 32, 0); // vendor length TODO
put_bits(&pb, 32, 0); // amount of comments put_bits(&pb, 32, 0); // amount of comments
put_bits(&pb, 1, 1); // framing put_bits(&pb, 1, 1); // framing
...@@ -564,8 +562,7 @@ static int put_main_header(vorbis_enc_context *venc, uint8_t **out) ...@@ -564,8 +562,7 @@ static int put_main_header(vorbis_enc_context *venc, uint8_t **out)
// setup header // setup header
init_put_bits(&pb, p, buffer_len); init_put_bits(&pb, p, buffer_len);
put_bits(&pb, 8, 5); //magic put_bits(&pb, 8, 5); //magic
for (i = 0; "vorbis"[i]; i++) ff_put_string(&pb, "vorbis", 0);
put_bits(&pb, 8, "vorbis"[i]);
// codebooks // codebooks
put_bits(&pb, 8, venc->ncodebooks - 1); put_bits(&pb, 8, venc->ncodebooks - 1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment