From 0217b856e5dad739dc75874d9a0360c6b048a719 Mon Sep 17 00:00:00 2001 From: Rodeo Date: Wed, 15 Aug 2012 15:15:35 +0000 Subject: Check the return code of hb_audio_resample_update(). This allows us to log an error when it fails, so we know which decoder actually called the function. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4904 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- libhb/deca52.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'libhb/deca52.c') diff --git a/libhb/deca52.c b/libhb/deca52.c index 5f9960a91..0df250fe9 100644 --- a/libhb/deca52.c +++ b/libhb/deca52.c @@ -373,9 +373,15 @@ static hb_buffer_t* Decode(hb_work_object_t *w) } } } - hb_audio_resample_update(pv->resample, AV_SAMPLE_FMT_FLT, - pv->channel_layout, (double)pv->state->slev, - (double)pv->state->clev, pv->nchannels); + if (hb_audio_resample_update(pv->resample, AV_SAMPLE_FMT_FLT, + pv->channel_layout, + (double)pv->state->slev, + (double)pv->state->clev, pv->nchannels)) + { + hb_log("deca52: hb_audio_resample_update() failed"); + hb_buffer_close(&flt); + return NULL; + } out = hb_audio_resample(pv->resample, (void*)flt->data, 1536); hb_buffer_close(&flt); } -- cgit v1.2.3