[Ffmpeg-devel] WMA encoding and Windows Media Player for Mac OS X

Tyler Loch tylerl82
Thu Mar 8 05:33:22 CET 2007


> changing
>             int64_t left=  st2->time_base.num * (int64_t)st - 
> >time_base.den;
>             int64_t right= st ->time_base.num * (int64_t)st2- 
> >time_base.den;
>             if((*next_point)->pkt.dts * left > pkt->dts * right) // 
> FIXME this can overflow
> to something like
>             int64_t left=  st2->time_base.num * (int64_t)st - 
> >time_base.den;
>             int64_t right= st ->time_base.num * (int64_t)st2- 
> >time_base.den;
>             int64_t leftdts= (*next_point)->pkt.dts;
> if(st2->codec.codec_type == CODEC_TYPE_AUDIO)
>     leftts +-= some constant;
>             if(leftdts * left > pkt->dts * right) //FIXME this can  
> overflow

Well, how 'bout that...
I had some trouble with st2->codec->codec_type detection doing much,  
but this code works FLAWLESSLY on every WMV player I have access to  
right now:

             int64_t left=  st2->time_base.num * (int64_t)st - 
 >time_base.den;
             int64_t right= st ->time_base.num * (int64_t)st2- 
 >time_base.den;
             int64_t leftdts = 0;
             if(leftdts * left > pkt->dts * right) //FIXME this can  
overflow


-Tyler Loch
Techspansion LLC
http://www.techspansion.com






More information about the ffmpeg-devel mailing list