[FFmpeg-devel] [PATCH] MPEG PS consider other audio tracks when muxing

Michael Niedermayer michaelni
Sun May 17 11:38:52 CEST 2009


On Sat, May 16, 2009 at 11:48:57PM -0700, Baptiste Coudurier wrote:
> Hi,
> 
> On 5/16/2009 8:03 AM, Yuriy Kaminskiy wrote:
> > Baptiste Coudurier wrote:
> >>>> -    if (s->is_vcd && only_for_stream_id==AUDIO_ID) {
> >>>> +    if (s->is_vcd && only_for_stream_id & 0xc000 == 0xc000) {
> >>> AUDIO_ID is 0xc0 not 0xc000
> >>
> >> I must have been high :)
> > And still are.
> >> Here is a better patch.
> > Tiny bit at most.
> 
> Shame on me.
> 
> >> -    if (s->is_vcd && only_for_stream_id==AUDIO_ID) {
> >> +    if (s->is_vcd && only_for_stream_id & 0xc0 == AUDIO_ID) {
> > (A&B==C) equal to (A&(B==C)); not ((A&B)==C) (as you expected).
> > I.e. this one is equal to ... && (only_for_stream_id & 1)).
> > [I personally never try to remember what is relative precedence between
> >  normal ops vs. bitwise ops, always use parenthesis[*] and you will be
> > ok, otherwise code would be hard to read and prone to errors]
> > FWIW, `gcc -Wall` would warn about this code.
> > 
> > [*] with exception of obvious cases - && vs ||, + vs *, etc;
> > but with bitwise ops and shift ALWAYS use parenthesis.
> 
> You are right, thanks for correcting me.
> 
> Another try.

looks good assuming its tested

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I wish the Xiph folks would stop pretending they've got something they
do not.  Somehow I fear this will remain a wish. -- M?ns Rullg?rd
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090517/2e892cc5/attachment.pgp>



More information about the ffmpeg-devel mailing list