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/declpcm.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/declpcm.c')
-rw-r--r-- | libhb/declpcm.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/libhb/declpcm.c b/libhb/declpcm.c index 1511a6abd..a9e7e6e8f 100644 --- a/libhb/declpcm.c +++ b/libhb/declpcm.c @@ -232,6 +232,7 @@ static int declpcmWork( hb_work_object_t * w, hb_buffer_t ** buf_in, static hb_buffer_t *Decode( hb_work_object_t *w ) { hb_work_private_t *pv = w->private_data; + hb_buffer_t *out; if (pv->nsamples == 0) return NULL; @@ -329,10 +330,14 @@ static hb_buffer_t *Decode( hb_work_object_t *w ) } break; } - hb_buffer_t *out; - hb_audio_resample_update(pv->resample, AV_SAMPLE_FMT_FLT, - hdr2layout[pv->nchannels - 1], HB_MIXLEV_DEFAULT, - HB_MIXLEV_DEFAULT, pv->nchannels); + if (hb_audio_resample_update(pv->resample, AV_SAMPLE_FMT_FLT, + hdr2layout[pv->nchannels - 1], + HB_MIXLEV_DEFAULT, HB_MIXLEV_DEFAULT, + pv->nchannels)) + { + hb_log("declpcm: hb_audio_resample_update() failed"); + return NULL; + } out = hb_audio_resample(pv->resample, (void*)pv->data, pv->nsamples); if (out == NULL) { |