[FFmpeg-cvslog] roqaudioenc: set correct bit rate

Justin Ruggles git at videolan.org
Sun Feb 26 05:21:48 CET 2012


ffmpeg | branch: master | Justin Ruggles <justin.ruggles at gmail.com> | Wed Feb 22 18:32:19 2012 -0500| [3fa9a999c1fe44a1592c9b4c01956ff509b86f8a] | committer: Justin Ruggles

roqaudioenc: set correct bit rate

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3fa9a999c1fe44a1592c9b4c01956ff509b86f8a
---

 libavcodec/roqaudioenc.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/libavcodec/roqaudioenc.c b/libavcodec/roqaudioenc.c
index 9137b02..6f36965 100644
--- a/libavcodec/roqaudioenc.c
+++ b/libavcodec/roqaudioenc.c
@@ -65,6 +65,8 @@ static av_cold int roq_dpcm_encode_init(AVCodecContext *avctx)
     }
 
     avctx->frame_size = ROQ_FRAME_SIZE;
+    avctx->bit_rate   = (ROQ_HEADER_SIZE + ROQ_FRAME_SIZE * avctx->channels) *
+                        (22050 / ROQ_FRAME_SIZE) * 8;
 
     context->frame_buffer = av_malloc(8 * ROQ_FRAME_SIZE * avctx->channels *
                                       sizeof(*context->frame_buffer));



More information about the ffmpeg-cvslog mailing list