diff mbox series

[FFmpeg-devel,06/11] doc/examples/mux: remove nop

Message ID 20240630231306.3779027-6-michael@niedermayer.cc
State New
Headers show
Series [FFmpeg-devel,01/11] MAINTAINERS: Add Timo Rothenpieler to server admins | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 fail Make fate failed
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Michael Niedermayer June 30, 2024, 11:12 p.m. UTC
Found through code review related to CID1604493 Overflowed constant

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 doc/examples/mux.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Michael Niedermayer July 10, 2024, 7:51 p.m. UTC | #1
On Mon, Jul 01, 2024 at 01:12:45AM +0200, Michael Niedermayer wrote:
> Found through code review related to CID1604493 Overflowed constant
> 
> Sponsored-by: Sovereign Tech Fund
> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> ---
>  doc/examples/mux.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)

will apply

[...]
diff mbox series

Patch

diff --git a/doc/examples/mux.c b/doc/examples/mux.c
index b034aad56f7..0f3a2bb125f 100644
--- a/doc/examples/mux.c
+++ b/doc/examples/mux.c
@@ -347,8 +347,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