Fix qplayvid desync due to losing some samples during resampling.

See bc8f978a5e logmessage.
This commit is contained in:
q3k 2013-05-04 13:18:13 +02:00
parent bc8f978a5e
commit 3b8f855ff0

View file

@ -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);