[FFmpeg-cvslog] r20095 - trunk/libavcodec/vorbis_enc.c
reimar
subversion
Wed Sep 30 12:37:37 CEST 2009
Author: reimar
Date: Wed Sep 30 12:37:37 2009
New Revision: 20095
Log:
Use ff_put_string in vorbis encoder.
Modified:
trunk/libavcodec/vorbis_enc.c
Modified: trunk/libavcodec/vorbis_enc.c
==============================================================================
--- trunk/libavcodec/vorbis_enc.c Wed Sep 30 11:49:12 2009 (r20094)
+++ trunk/libavcodec/vorbis_enc.c Wed Sep 30 12:37:37 2009 (r20095)
@@ -530,8 +530,7 @@ static int put_main_header(vorbis_enc_co
// 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 @@ static int put_main_header(vorbis_enc_co
// 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 @@ static int put_main_header(vorbis_enc_co
// 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);
More information about the ffmpeg-cvslog
mailing list