[FFmpeg-trac] #5785(swresample:new): swr_drop_output misbehaviour
FFmpeg
trac at avcodec.org
Fri Aug 19 17:44:47 EEST 2016
#5785: swr_drop_output misbehaviour
------------------------------------+--------------------------------------
Reporter: richardpl | Owner:
Type: defect | Status: new
Priority: normal | Component: swresample
Version: git-master | Resolution:
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
------------------------------------+--------------------------------------
Comment (by michael):
The example seems buggy, it doesnt produce a sinewave that repeats every
1000 samples so droping 1000 will not produce a smooth output. If that is
corrected with the patch below the output seems fine.
Or maybe iam missunderstanding the issue ?
{{{
diff --git a/doc/examples/resampling_audio.c
b/doc/examples/resampling_audio.c
index 2dd2513..a698275 100644
--- a/doc/examples/resampling_audio.c
+++ b/doc/examples/resampling_audio.c
@@ -66,7 +66,7 @@ static void fill_samples(double *dst, int nb_samples,
int nb_channels, int sampl
{
int i, j;
double tincr = 1.0 / sample_rate, *dstp = dst;
- const double c = 2 * M_PI * 440.0;
+ const double c = 2 * M_PI * 48000 / 100; // or 48000 / 1000
/* generate sin tone with 440Hz frequency and duplicated channels */
for (i = 0; i < nb_samples; i++) {
}}}
--
Ticket URL: <https://trac.ffmpeg.org/ticket/5785#comment:1>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list