]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
channel.c: Fix invalid reference in conditionaled out code.
authorRichard Mudgett <rmudgett@digium.com>
Mon, 25 Sep 2017 15:59:17 +0000 (10:59 -0500)
committerRichard Mudgett <rmudgett@digium.com>
Mon, 25 Sep 2017 16:22:26 +0000 (11:22 -0500)
ASTERISK-27289

Change-Id: I7a415948116493050614d9f4fa91ffbe0c21ec4c

main/channel.c

index 3e5674a05dabf1bb804ce2f8efecde3a4a743af6..970d81373c71c245122cadbc176973ce0a291454 100644 (file)
@@ -4293,7 +4293,7 @@ static struct ast_frame *__ast_read(struct ast_channel *chan, int dropaudio)
                                }
 #else
                                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));
                                if (jump - MONITOR_DELAY >= 0) {
                                        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
                                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));
                                if (jump - MONITOR_DELAY >= 0) {
                                        if (ast_seekstream(ast_channel_monitor(chan)->write_stream, jump - cur->samples, SEEK_FORCECUR) == -1) {