- case SAMPLE_FMT_S16:
- sample_size_in_bytes = 2;
- break;
- /* We should handle other formats here - but that needs additional format conversion work below */
- /* For now we'll just report the error and try to carry on */
- default:
- hb_log("decavcodecWork - Unknown Sample Format from avcodec_decode_audio (%d) !", pv->context->sample_fmt);
- break;
- }
-
- buf->start = cur;
- buf->stop = cur + 90000 * ( out_size / (sample_size_in_bytes * pv->context->channels) ) /
- pv->context->sample_rate;
- cur = buf->stop;
-
- s16 = bufaligned;
- fl32 = (float *) buf->data;
- for( i = 0; i < out_size / 2; i++ )
- {
- fl32[i] = s16[i];
- }
-
- if( last )
- {
- last = last->next = buf;
- }
- else
- {
- *buf_out = last = buf;