From f2716bfb1bda6efefd97d7de2ba45ff876a94c11 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 30 Jun 2024 22:00:04 +0200 Subject: [PATCH] doc/examples/mux: remove nop Found through code review related to CID1604493 Overflowed constant Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer (cherry picked from commit e6c0c5731e85f00b5840d9a7d14e38cc3e07d5bc) Signed-off-by: Michael Niedermayer --- doc/examples/muxing.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/doc/examples/muxing.c b/doc/examples/muxing.c index 42f704c258..c98f749163 100644 --- a/doc/examples/muxing.c +++ b/doc/examples/muxing.c @@ -350,8 +350,7 @@ static int write_audio_frame(AVFormatContext *oc, OutputStream *ost) if (frame) { /* convert samples from native format to destination codec format, using the resampler */ /* compute destination number of samples */ - dst_nb_samples = av_rescale_rnd(swr_get_delay(ost->swr_ctx, c->sample_rate) + frame->nb_samples, - c->sample_rate, c->sample_rate, AV_ROUND_UP); + dst_nb_samples = swr_get_delay(ost->swr_ctx, c->sample_rate) + frame->nb_samples; av_assert0(dst_nb_samples == frame->nb_samples); /* when we pass a frame to the encoder, it may keep a reference to it