mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
libvorbis: K&R reformatting cosmetics
This commit is contained in:
parent
c4db344664
commit
ca5ab8cd21
@ -61,7 +61,8 @@ static const AVOption options[]={
|
||||
};
|
||||
static const AVClass class = { "libvorbis", av_default_item_name, options, LIBAVUTIL_VERSION_INT };
|
||||
|
||||
static av_cold int oggvorbis_init_encoder(vorbis_info *vi, AVCodecContext *avccontext) {
|
||||
static av_cold int oggvorbis_init_encoder(vorbis_info *vi, AVCodecContext *avccontext)
|
||||
{
|
||||
OggVorbisContext *context = avccontext->priv_data;
|
||||
double cfreq;
|
||||
|
||||
@ -77,7 +78,8 @@ static av_cold int oggvorbis_init_encoder(vorbis_info *vi, AVCodecContext *avcco
|
||||
|
||||
/* constant bitrate */
|
||||
if (vorbis_encode_setup_managed(vi, avccontext->channels,
|
||||
avccontext->sample_rate, minrate, avccontext->bit_rate, maxrate))
|
||||
avccontext->sample_rate, minrate,
|
||||
avccontext->bit_rate, maxrate))
|
||||
return -1;
|
||||
|
||||
/* variable bitrate by estimate, disable slow rate management */
|
||||
@ -101,9 +103,13 @@ static av_cold int oggvorbis_init_encoder(vorbis_info *vi, AVCodecContext *avcco
|
||||
}
|
||||
|
||||
/* How many bytes are needed for a buffer of length 'l' */
|
||||
static int xiph_len(int l) { return (1 + l / 255 + l); }
|
||||
static int xiph_len(int l)
|
||||
{
|
||||
return (1 + l / 255 + l);
|
||||
}
|
||||
|
||||
static av_cold int oggvorbis_encode_init(AVCodecContext *avccontext) {
|
||||
static av_cold int oggvorbis_encode_init(AVCodecContext *avccontext)
|
||||
{
|
||||
OggVorbisContext *context = avccontext->priv_data;
|
||||
ogg_packet header, header_comm, header_code;
|
||||
uint8_t *p;
|
||||
@ -140,9 +146,11 @@ static av_cold int oggvorbis_encode_init(AVCodecContext *avccontext) {
|
||||
offset += header_code.bytes;
|
||||
assert(offset == avccontext->extradata_size);
|
||||
|
||||
/* vorbis_block_clear(&context->vb);
|
||||
#if 0
|
||||
vorbis_block_clear(&context->vb);
|
||||
vorbis_dsp_clear(&context->vd);
|
||||
vorbis_info_clear(&context->vi);*/
|
||||
vorbis_info_clear(&context->vi);
|
||||
#endif
|
||||
vorbis_comment_clear(&context->vc);
|
||||
|
||||
avccontext->frame_size = OGGVORBIS_FRAME_SIZE;
|
||||
@ -153,7 +161,6 @@ static av_cold int oggvorbis_encode_init(AVCodecContext *avccontext) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static int oggvorbis_encode_frame(AVCodecContext *avccontext,
|
||||
unsigned char *packets,
|
||||
int buf_size, void *data)
|
||||
@ -226,8 +233,8 @@ static int oggvorbis_encode_frame(AVCodecContext *avccontext,
|
||||
return l;
|
||||
}
|
||||
|
||||
|
||||
static av_cold int oggvorbis_encode_close(AVCodecContext *avccontext) {
|
||||
static av_cold int oggvorbis_encode_close(AVCodecContext *avccontext)
|
||||
{
|
||||
OggVorbisContext *context = avccontext->priv_data;
|
||||
/* ogg_packet op ; */
|
||||
|
||||
@ -243,7 +250,6 @@ static av_cold int oggvorbis_encode_close(AVCodecContext *avccontext) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
AVCodec ff_libvorbis_encoder = {
|
||||
.name = "libvorbis",
|
||||
.type = AVMEDIA_TYPE_AUDIO,
|
||||
|
Loading…
Reference in New Issue
Block a user