diff --git a/main/channel.c b/main/channel.c index 4fb226d491a741286804e6d20f7faf42e65d6e8e..bad14800cd87a0267c26ebc04dd3bef67a7396d9 100644 --- a/main/channel.c +++ b/main/channel.c @@ -5225,7 +5225,7 @@ int ast_write_stream(struct ast_channel *chan, int stream_num, struct ast_frame if (jump >= 0) { jump = calc_monitor_jump((ast_channel_insmpl(chan) - ast_channel_outsmpl(chan)), 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)->write_stream->fmt->format)); if (ast_seekstream(ast_channel_monitor(chan)->write_stream, jump, SEEK_FORCECUR) == -1) { ast_log(LOG_WARNING, "Failed to perform seek in monitoring write stream, synchronization between the files may be broken\n"); } @@ -5236,7 +5236,7 @@ int ast_write_stream(struct ast_channel *chan, int stream_num, struct ast_frame #else int jump = calc_monitor_jump((ast_channel_insmpl(chan) - ast_channel_outsmpl(chan)), 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)->write_stream->fmt->format)); if (jump - MONITOR_DELAY >= 0) { if (ast_seekstream(ast_channel_monitor(chan)->write_stream, jump - cur->samples, SEEK_FORCECUR) == -1) { ast_log(LOG_WARNING, "Failed to perform seek in monitoring write stream, synchronization between the files may be broken\n");