[asterisk-bugs] [JIRA] (ASTERISK-27289) A codeblock that maintains a bug, but maybe the codeblock will never run

Huangyx (JIRA) noreply at issues.asterisk.org
Fri Sep 22 21:51:08 CDT 2017


Huangyx created ASTERISK-27289:
----------------------------------

             Summary: A codeblock that maintains a bug,but maybe the codeblock will never run
                 Key: ASTERISK-27289
                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-27289
             Project: Asterisk
          Issue Type: Bug
      Security Level: None
          Components: Channels/General
    Affects Versions: 15.0.0-rc1
         Environment: fedora26
kernel:4.11.9-300
            Reporter: Huangyx


CODE:
#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(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) {
						ast_log(LOG_WARNING, "Failed to perform seek in monitoring read stream, synchronization between the files may be broken\n");
					}
					ast_channel_insmpl(chan) += ast_channel_outsmpl(chan) - ast_channel_insmpl(chan);
				} else {
					ast_channel_insmpl(chan) += f->samples;
				}

DESCRIPTION:
The function ast_format_get_sample_rate's parameter should have been a format,but the code shows a codec.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list