summaryrefslogtreecommitdiffstats
path: root/libhb/decavcodec.c
diff options
context:
space:
mode:
Diffstat (limited to 'libhb/decavcodec.c')
-rw-r--r--libhb/decavcodec.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/libhb/decavcodec.c b/libhb/decavcodec.c
index 4301f43db..4dc9a587e 100644
--- a/libhb/decavcodec.c
+++ b/libhb/decavcodec.c
@@ -39,15 +39,15 @@ struct hb_work_private_s
int decavcodecInit( hb_work_object_t * w, hb_job_t * job )
{
AVCodec * codec;
-
+
hb_work_private_t * pv = calloc( 1, sizeof( hb_work_private_t ) );
w->private_data = pv;
pv->job = job;
-
+
codec = avcodec_find_decoder( CODEC_ID_MP2 );
pv->parser = av_parser_init(CODEC_ID_MP2);
-
+
pv->context = avcodec_alloc_context();
avcodec_open( pv->context, codec );
pv->pts_last = -1;
@@ -82,7 +82,7 @@ int decavcodecWork( hb_work_object_t * w, hb_buffer_t ** buf_in,
uint64_t cur;
unsigned char *parser_output_buffer;
int parser_output_buffer_len;
-
+
*buf_out = NULL;
if( in->start < 0 ||
@@ -101,7 +101,7 @@ int decavcodecWork( hb_work_object_t * w, hb_buffer_t ** buf_in,
while( pos < in->size )
{
len = av_parser_parse(pv->parser, pv->context,&parser_output_buffer,&parser_output_buffer_len,in->data + pos,in->size - pos,cur,cur);
-
+
out_size = 0;
uncompressed_len = 0;
if (parser_output_buffer_len)
@@ -122,11 +122,11 @@ int decavcodecWork( hb_work_object_t * w, hb_buffer_t ** buf_in,
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:
+ 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;