changeset 10326:b10c3bc8ea3e libavcodec

Use ff_put_string in vorbis encoder.
author reimar
date Wed, 30 Sep 2009 10:37:37 +0000
parents 36b60aa6bc75
children bf04c3ecdfe5
files vorbis_enc.c
diffstat 1 files changed, 3 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/vorbis_enc.c	Wed Sep 30 09:49:12 2009 +0000
+++ b/vorbis_enc.c	Wed Sep 30 10:37:37 2009 +0000
@@ -530,8 +530,7 @@
     // identification header
     init_put_bits(&pb, p, buffer_len);
     put_bits(&pb, 8, 1); //magic
-    for (i = 0; "vorbis"[i]; i++)
-        put_bits(&pb, 8, "vorbis"[i]);
+    ff_put_string(&pb, "vorbis", 0);
     put_bits(&pb, 32, 0); // version
     put_bits(&pb,  8, venc->channels);
     put_bits(&pb, 32, venc->sample_rate);
@@ -550,8 +549,7 @@
     // comment header
     init_put_bits(&pb, p, buffer_len);
     put_bits(&pb, 8, 3); //magic
-    for (i = 0; "vorbis"[i]; i++)
-        put_bits(&pb, 8, "vorbis"[i]);
+    ff_put_string(&pb, "vorbis", 0);
     put_bits(&pb, 32, 0); // vendor length TODO
     put_bits(&pb, 32, 0); // amount of comments
     put_bits(&pb,  1, 1); // framing
@@ -564,8 +562,7 @@
     // setup header
     init_put_bits(&pb, p, buffer_len);
     put_bits(&pb, 8, 5); //magic
-    for (i = 0; "vorbis"[i]; i++)
-        put_bits(&pb, 8, "vorbis"[i]);
+    ff_put_string(&pb, "vorbis", 0);
 
     // codebooks
     put_bits(&pb, 8, venc->ncodebooks - 1);