You've already forked FFmpeg
							
							
				mirror of
				https://github.com/FFmpeg/FFmpeg.git
				synced 2025-10-30 23:18:11 +02:00 
			
		
		
		
	lavc/libgsmenc: Force mono and use 13k as default bitrate.
This commit is contained in:
		| @@ -114,6 +114,10 @@ static int libgsm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, | |||||||
|     return 0; |     return 0; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | static const AVCodecDefault libgsm_defaults[] = { | ||||||
|  |     { "b",                "13000" }, | ||||||
|  |     { NULL }, | ||||||
|  | }; | ||||||
|  |  | ||||||
| #if CONFIG_LIBGSM_ENCODER | #if CONFIG_LIBGSM_ENCODER | ||||||
| AVCodec ff_libgsm_encoder = { | AVCodec ff_libgsm_encoder = { | ||||||
| @@ -124,6 +128,8 @@ AVCodec ff_libgsm_encoder = { | |||||||
|     .init           = libgsm_encode_init, |     .init           = libgsm_encode_init, | ||||||
|     .encode2        = libgsm_encode_frame, |     .encode2        = libgsm_encode_frame, | ||||||
|     .close          = libgsm_encode_close, |     .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, |     .sample_fmts    = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16, | ||||||
|                                                      AV_SAMPLE_FMT_NONE }, |                                                      AV_SAMPLE_FMT_NONE }, | ||||||
|     .wrapper_name   = "libgsm", |     .wrapper_name   = "libgsm", | ||||||
| @@ -138,6 +144,8 @@ AVCodec ff_libgsm_ms_encoder = { | |||||||
|     .init           = libgsm_encode_init, |     .init           = libgsm_encode_init, | ||||||
|     .encode2        = libgsm_encode_frame, |     .encode2        = libgsm_encode_frame, | ||||||
|     .close          = libgsm_encode_close, |     .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, |     .sample_fmts    = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16, | ||||||
|                                                      AV_SAMPLE_FMT_NONE }, |                                                      AV_SAMPLE_FMT_NONE }, | ||||||
|     .wrapper_name   = "libgsm", |     .wrapper_name   = "libgsm", | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user