summaryrefslogtreecommitdiff
path: root/libavcodec/vorbis_enc.c
diff options
context:
space:
mode:
authorOded Shimon <ods15@ods15.dyndns.org>2006-10-02 05:56:05 +0000
committerOded Shimon <ods15@ods15.dyndns.org>2006-10-02 05:56:05 +0000
commitb1f6c8b1201be7ecb765be69e981b470023f7b62 (patch)
tree48312748fdc238825d7811955bbe3842619fb92b /libavcodec/vorbis_enc.c
parent2d06ce4c879549f13fc1c514cdb5680603f635d1 (diff)
Original Commit: r27 | ods15 | 2006-09-22 14:19:51 +0300 (Fri, 22 Sep 2006) | 2 lines
better frame_size, depending on blocksize Originally committed as revision 6438 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/vorbis_enc.c')
-rw-r--r--libavcodec/vorbis_enc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/vorbis_enc.c b/libavcodec/vorbis_enc.c
index 246b579787..10c723edcd 100644
--- a/libavcodec/vorbis_enc.c
+++ b/libavcodec/vorbis_enc.c
@@ -534,7 +534,7 @@ static int vorbis_encode_init(AVCodecContext * avccontext)
avccontext->extradata_size = put_main_header(venc, (uint8_t**)&avccontext->extradata);
- avccontext->frame_size = VORBIS_FRAME_SIZE;
+ avccontext->frame_size = 1 << venc->blocksize[0];
avccontext->coded_frame = avcodec_alloc_frame();
avccontext->coded_frame->key_frame = 1;
@@ -548,7 +548,7 @@ static int vorbis_encode_frame(AVCodecContext * avccontext, unsigned char * pack
#if 0
venc_context_t * venc = avccontext->priv_data;
signed short * audio = data;
- int samples = data ? VORBIS_FRAME_SIZE : 0;
+ int samples = data ? avccontext->frame_size : 0;
avccontext->coded_frame->pts = av_rescale_q(op2->granulepos, (AVRational){1, avccontext->sample_rate}, avccontext->time_base);
memcpy(packets, compressed_frame, l);