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

Richard Mudgett (JIRA) noreply at issues.asterisk.org
Mon Sep 25 10:03:07 CDT 2017


     [ https://issues.asterisk.org/jira/browse/ASTERISK-27289?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Richard Mudgett updated ASTERISK-27289:
---------------------------------------

    Description: 
CODE:
{noformat}
#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;
				}
{noformat}

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

  was:
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.


> 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:
> {noformat}
> #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;
> 				}
> {noformat}
> 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