[FFmpeg-cvslog] lavc/libgsmenc: Force mono and use 13k as default bitrate.

Carl Eugen Hoyos git at videolan.org
Sun Feb 17 02:05:05 EET 2019


ffmpeg | branch: master | Carl Eugen Hoyos <ceffmpeg at gmail.com> | Sat Feb 16 20:18:07 2019 +0100| [fe7d8c993ff9b72752ce8cad562fe40b1dc2a7cc] | committer: Carl Eugen Hoyos

lavc/libgsmenc: Force mono and use 13k as default bitrate.

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

 libavcodec/libgsmenc.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/libavcodec/libgsmenc.c b/libavcodec/libgsmenc.c
index c9e7ba056e..fdb11c705e 100644
--- a/libavcodec/libgsmenc.c
+++ b/libavcodec/libgsmenc.c
@@ -114,6 +114,10 @@ static int libgsm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
     return 0;
 }
 
+static const AVCodecDefault libgsm_defaults[] = {
+    { "b",                "13000" },
+    { NULL },
+};
 
 #if CONFIG_LIBGSM_ENCODER
 AVCodec ff_libgsm_encoder = {
@@ -124,6 +128,8 @@ AVCodec ff_libgsm_encoder = {
     .init           = libgsm_encode_init,
     .encode2        = libgsm_encode_frame,
     .close          = libgsm_encode_close,
+    .defaults       = libgsm_defaults,
+    .channel_layouts= (const uint64_t[]) { AV_CH_LAYOUT_MONO, 0 },
     .sample_fmts    = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
                                                      AV_SAMPLE_FMT_NONE },
     .wrapper_name   = "libgsm",
@@ -138,6 +144,8 @@ AVCodec ff_libgsm_ms_encoder = {
     .init           = libgsm_encode_init,
     .encode2        = libgsm_encode_frame,
     .close          = libgsm_encode_close,
+    .defaults       = libgsm_defaults,
+    .channel_layouts= (const uint64_t[]) { AV_CH_LAYOUT_MONO, 0 },
     .sample_fmts    = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
                                                      AV_SAMPLE_FMT_NONE },
     .wrapper_name   = "libgsm",



More information about the ffmpeg-cvslog mailing list