diff options
author | Rodeo <[email protected]> | 2012-08-15 15:15:35 +0000 |
---|---|---|
committer | Rodeo <[email protected]> | 2012-08-15 15:15:35 +0000 |
commit | 0217b856e5dad739dc75874d9a0360c6b048a719 (patch) | |
tree | 2b9c0a026dde977fe30665957ef99518f38f624d /libhb/deca52.c | |
parent | 939a4a3e6ffefa889ad3ebcf8db6ba93f74c8803 (diff) |
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
Diffstat (limited to 'libhb/deca52.c')
-rw-r--r-- | libhb/deca52.c | 12 |
1 files changed, 9 insertions, 3 deletions
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); } |