mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
format: Reintroduce smoother flags
In review 4843 (ASTERISK-24858), we added a hack that forced a smoother creation when sending signed linear so that the byte order was adjusted during transmission. This was needed because smoother flags were lost during the new format work that was done in Asterisk 13. Rather than rolling that same hack into res_rtp_multicast, re-introduce smoother flags so that formats can dictate their own options. Change-Id: I77b835fba0e539c6ce50014a984766f63cab2c16
This commit is contained in:
@@ -377,7 +377,13 @@ const char *ast_format_get_codec_name(const struct ast_format *format)
|
||||
|
||||
int ast_format_can_be_smoothed(const struct ast_format *format)
|
||||
{
|
||||
return format->codec->smooth;
|
||||
/* Coalesce to 1 if non-zero */
|
||||
return format->codec->smooth ? 1 : 0;
|
||||
}
|
||||
|
||||
int ast_format_get_smoother_flags(const struct ast_format *format)
|
||||
{
|
||||
return AST_SMOOTHER_FLAGS_UNPACK(format->codec->smooth);
|
||||
}
|
||||
|
||||
enum ast_media_type ast_format_get_type(const struct ast_format *format)
|
||||
|
Reference in New Issue
Block a user