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
{
// 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;
}
// 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 ) )
{