[FFmpeg-devel] [PATCH] MPEG PS consider other audio tracks when muxing
Baptiste Coudurier
baptiste.coudurier
Sun May 17 08:48:57 CEST 2009
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.
--
Baptiste COUDURIER GnuPG Key Id: 0x5C1ABAAA
Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
FFmpeg maintainer http://www.ffmpeg.org
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ps_audio3.patch
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090516/c27fc96a/attachment.asc>
More information about the ffmpeg-devel
mailing list