summaryrefslogtreecommitdiffstats
path: root/libhb/decavcodec.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2014-11-05 22:24:47 +0000
committerjstebbins <[email protected]>2014-11-05 22:24:47 +0000
commit0780662d46a5c9e427bc0f9bc0057907c478d294 (patch)
tree6b78ed140cc071663d31b314c638ac346b7383af /libhb/decavcodec.c
parent621c1fc9e9c2fed72036a97aacc2674d250cdba0 (diff)
libhb: enable crc checking of audio streams during audio parameter probe
We used to check ac3 crc's when we used a52 dec. When we switched to libav we did not enable crc checks. I suspect this is the root cause of this problem https://forum.handbrake.fr/viewtopic.php?f=12&t=31032 git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6507 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/decavcodec.c')
-rw-r--r--libhb/decavcodec.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/libhb/decavcodec.c b/libhb/decavcodec.c
index a0bd0454a..324b665c3 100644
--- a/libhb/decavcodec.c
+++ b/libhb/decavcodec.c
@@ -573,7 +573,7 @@ static int decavcodecaWork( hb_work_object_t * w, hb_buffer_t ** buf_in,
pout = in->data;
len = pout_len = in->size;
}
- if (pout)
+ if (pout != NULL && pout_len > 0)
{
decodeAudio( w->audio, pv, pout, pout_len, cur );
}
@@ -646,10 +646,15 @@ static int decavcodecaBSInfo( hb_work_object_t *w, const hb_buffer_t *buf,
}
hb_ff_set_sample_fmt( context, codec, AV_SAMPLE_FMT_FLT );
- if ( hb_avcodec_open( context, codec, NULL, 0 ) )
+
+ AVDictionary * av_opts = NULL;
+ av_dict_set( &av_opts, "err_detect", "crccheck+explode", 0 );
+ if ( hb_avcodec_open( context, codec, &av_opts, 0 ) )
{
+ av_dict_free( &av_opts );
return -1;
}
+ av_dict_free( &av_opts );
unsigned char *parse_buffer;
int parse_pos, dec_pos, parse_buffer_size;