]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
format_gsm.c: Added mime type
authorAlexey Khabulyak <khabalex@gmail.com>
Tue, 3 Dec 2024 09:53:10 +0000 (12:53 +0300)
committerAlexey Khabulyak <khabalex@gmail.com>
Tue, 10 Dec 2024 13:25:04 +0000 (13:25 +0000)
Sometimes it's impossible to get a file extension from URL
(eg. http://example.com/gsm/your) so we have to rely on content-type header.
Currenly, asterisk does not support content-type for gsm format(unlike wav).
Added audio/gsm according to https://www.rfc-editor.org/rfc/rfc4856.html

formats/format_gsm.c

index 48699b6ac5ee089ffbb84050e5db6fcfda5c2955..87157eae3f03538f3351324ce725344022e2530c 100644 (file)
@@ -174,6 +174,7 @@ static off_t gsm_tell(struct ast_filestream *fs)
 static struct ast_format_def gsm_f = {
        .name = "gsm",
        .exts = "gsm",
+       .mime_types = "audio/gsm",
        .write = gsm_write,
        .seek = gsm_seek,
        .trunc = gsm_trunc,