From 3b8f855ff0a38eca00acb008a386f66340986d14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergiusz=20=27q3k=27=20Baza=C5=84ski?= Date: Sat, 4 May 2013 13:18:13 +0200 Subject: [PATCH] Fix qplayvid desync due to losing some samples during resampling. See bc8f978a5ea10fc7a5adf10b97c3f824dc332034 logmessage. --- tools/qplayvid/qplayvid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/qplayvid/qplayvid.c b/tools/qplayvid/qplayvid.c index 50a28db..0a51dc6 100644 --- a/tools/qplayvid/qplayvid.c +++ b/tools/qplayvid/qplayvid.c @@ -142,7 +142,7 @@ size_t decode_audio(PlayerCtx *ctx, AVPacket *packet, int new_packet, int32_t se return decoded; int out_samples = avresample_convert(ctx->a_resampler, - (uint8_t **)ctx->a_resample_output, 0, in_samples, + (uint8_t **)ctx->a_resample_output, 0, AVCODEC_MAX_AUDIO_FRAME_SIZE, ctx->a_frame->data, ctx->a_frame->linesize[0], in_samples); pthread_mutex_lock(&ctx->a_buf_mutex);