summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2010-11-06 17:22:12 +0000
committerjstebbins <[email protected]>2010-11-06 17:22:12 +0000
commita70ca6bf9e0550307244f436e85cb85587d7a012 (patch)
treee252d461d574b79c379a78a410e6db654f97ae17
parentf93538e651593c3898199b36150ffd3c71074330 (diff)
fix windows crash and probably other random nastiness.
Initializing extradata_size to non-zero makes ffmpeg think it needs to parse extradata. But in the non-broken-by-microsoft case we leave extradata as uninitialized junk. So ffmpeg parses uninitialized data and sometimes marches off into the weeds. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3651 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--libhb/decavcodec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libhb/decavcodec.c b/libhb/decavcodec.c
index f49759392..c40ce49ec 100644
--- a/libhb/decavcodec.c
+++ b/libhb/decavcodec.c
@@ -960,7 +960,7 @@ static int setup_extradata( hb_work_object_t *w, hb_buffer_t *in )
{
// we haven't been inflicted with M$ - allocate a little space as
// a marker and return success.
- pv->context->extradata_size = 16;
+ pv->context->extradata_size = 0;
pv->context->extradata = av_malloc(pv->context->extradata_size);
return 0;
}
@@ -1025,7 +1025,7 @@ static int decavcodecvWork( hb_work_object_t * w, hb_buffer_t ** buf_in,
// if this is the first frame open the codec (we have to wait for the
// first frame because of M$ VC1 braindamage).
- if ( pv->context->extradata_size == 0 )
+ if ( pv->context->extradata == NULL )
{
if ( setup_extradata( w, in ) )
{