Mercurial > libavcodec.hg
comparison vorbis_enc.c @ 3809:500d86b68542 libavcodec
Original Commit: r3 | ods15 | 2006-09-16 11:49:07 +0300 (Sat, 16 Sep 2006) | 2 lines
cosmetics
author | ods15 |
---|---|
date | Mon, 02 Oct 2006 05:55:14 +0000 |
parents | 5551768b5a4f |
children | a8bebf3e9cb7 |
comparison
equal
deleted
inserted
replaced
3808:5551768b5a4f | 3809:500d86b68542 |
---|---|
34 typedef struct { | 34 typedef struct { |
35 uint8_t buffer[BUFFER_SIZE]; | 35 uint8_t buffer[BUFFER_SIZE]; |
36 int buffer_index; | 36 int buffer_index; |
37 } venc_context_t; | 37 } venc_context_t; |
38 | 38 |
39 static int vorbis_encode_init(AVCodecContext * avccontext) { | 39 static int vorbis_encode_init(AVCodecContext * avccontext) |
40 { | |
40 venc_context_t * venc = avccontext->priv_data; | 41 venc_context_t * venc = avccontext->priv_data; |
41 uint8_t *p; | 42 uint8_t *p; |
42 unsigned int offset, len; | 43 unsigned int offset, len; |
43 | 44 |
44 avccontext->channels; | 45 avccontext->channels; |
61 memcpy(&p[offset], header_code.packet, header_code.bytes); | 62 memcpy(&p[offset], header_code.packet, header_code.bytes); |
62 offset += header_code.bytes; | 63 offset += header_code.bytes; |
63 avccontext->extradata_size = offset; | 64 avccontext->extradata_size = offset; |
64 avccontext->extradata = av_realloc(avccontext->extradata, avccontext->extradata_size); | 65 avccontext->extradata = av_realloc(avccontext->extradata, avccontext->extradata_size); |
65 | 66 |
66 avccontext->frame_size = OGGVORBIS_FRAME_SIZE; | 67 avccontext->frame_size = VORBIS_FRAME_SIZE; |
67 | 68 |
68 avccontext->coded_frame = avcodec_alloc_frame(); | 69 avccontext->coded_frame = avcodec_alloc_frame(); |
69 avccontext->coded_frame->key_frame = 1; | 70 avccontext->coded_frame->key_frame = 1; |
70 | 71 |
71 return 0; | 72 return 0; |