mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-06 05:02:29 +00:00
Merge "channel.c: Fix invalid reference in conditionaled out code." into 13
This commit is contained in:
@@ -4293,7 +4293,7 @@ static struct ast_frame *__ast_read(struct ast_channel *chan, int dropaudio)
|
|||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
int jump = calc_monitor_jump((ast_channel_outsmpl(chan) - ast_channel_insmpl(chan)),
|
int jump = calc_monitor_jump((ast_channel_outsmpl(chan) - ast_channel_insmpl(chan)),
|
||||||
ast_format_get_sample_rate(f->subclass.codec),
|
ast_format_get_sample_rate(f->subclass.format),
|
||||||
ast_format_get_sample_rate(ast_channel_monitor(chan)->read_stream->fmt->format));
|
ast_format_get_sample_rate(ast_channel_monitor(chan)->read_stream->fmt->format));
|
||||||
if (jump - MONITOR_DELAY >= 0) {
|
if (jump - MONITOR_DELAY >= 0) {
|
||||||
if (ast_seekstream(ast_channel_monitor(chan)->read_stream, jump - f->samples, SEEK_FORCECUR) == -1) {
|
if (ast_seekstream(ast_channel_monitor(chan)->read_stream, jump - f->samples, SEEK_FORCECUR) == -1) {
|
||||||
@@ -5375,7 +5375,7 @@ int ast_write(struct ast_channel *chan, struct ast_frame *fr)
|
|||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
int jump = calc_monitor_jump((ast_channel_insmpl(chan) - ast_channel_outsmpl(chan)),
|
int jump = calc_monitor_jump((ast_channel_insmpl(chan) - ast_channel_outsmpl(chan)),
|
||||||
ast_format_get_sample_rate(f->subclass.codec),
|
ast_format_get_sample_rate(f->subclass.format),
|
||||||
ast_format_get_sample_rate(ast_channel_monitor(chan)->read_stream->fmt->format));
|
ast_format_get_sample_rate(ast_channel_monitor(chan)->read_stream->fmt->format));
|
||||||
if (jump - MONITOR_DELAY >= 0) {
|
if (jump - MONITOR_DELAY >= 0) {
|
||||||
if (ast_seekstream(ast_channel_monitor(chan)->write_stream, jump - cur->samples, SEEK_FORCECUR) == -1) {
|
if (ast_seekstream(ast_channel_monitor(chan)->write_stream, jump - cur->samples, SEEK_FORCECUR) == -1) {
|
||||||
|
Reference in New Issue
Block a user