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/decavcodec.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/decavcodec.c')
-rw-r--r-- | libhb/decavcodec.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/libhb/decavcodec.c b/libhb/decavcodec.c index 3ea41df23..11a04a8b4 100644 --- a/libhb/decavcodec.c +++ b/libhb/decavcodec.c @@ -1464,10 +1464,16 @@ static void decodeAudio(hb_audio_t *audio, hb_work_private_t *pv, uint8_t *data, } else { - hb_audio_resample_update(pv->resample, pv->context->sample_fmt, - pv->context->channel_layout, - HB_MIXLEV_DEFAULT, HB_MIXLEV_DEFAULT, - pv->context->channels); + if (hb_audio_resample_update(pv->resample, + pv->context->sample_fmt, + pv->context->channel_layout, + HB_MIXLEV_DEFAULT, + HB_MIXLEV_DEFAULT, + pv->context->channels)) + { + hb_log("decavcodec: hb_audio_resample_update() failed"); + return; + } out = hb_audio_resample(pv->resample, (void*)frame.data[0], frame.nb_samples); } |