NULL, /* no initial buffer */
0, /* no initial bytes */
ovc); /* the ov_open_callbacks */
- if (ret == OV_ENOTVORBIS) {
+ if (ret == OV_ENOTVORBIS || ret == OV_EBADHEADER) {
/* this might be due to the input buffer being too small */
int ib = 1024 * conf->initial_buffer_arg; /* initial buffer */
if (len < ib) {
pod->vf = NULL;
return 0;
}
- return -E_OGGDEC_NOTVORBIS;
+ return ret == OV_ENOTVORBIS?
+ -E_OGGDEC_NOTVORBIS : -E_OGGDEC_BADHEADER;
}
if (ret == OV_EREAD)
return -E_OGGDEC_READ;
if (ret == OV_EVERSION)
return -E_OGGDEC_VERSION;
- if (ret == OV_EBADHEADER)
- return -E_OGGDEC_BADHEADER;
if (ret < 0)
return -E_OGGDEC_FAULT;
fn->fc->channels = ov_info(pod->vf, 0)->channels;