[FFmpeg-devel] [PATCH] fix ts Continuity Count

Måns Rullgård mans
Fri Aug 31 11:03:41 CEST 2007


Limin Wang wrote:
> Hi,
>
> * M?ns Rullg?rd <mans at mansr.com> [2007-08-31 08:54:21 +0100]:
>
>> Limin Wang <lance.lmwang at gmail.com> writes:
>>
>> > Hi,
>> >
>> > $subj, please review it.
>> >
>> > Thanks,
>> > Limin
>> >
>> > Index: libavformat/mpegtsenc.c
>> > ===================================================================
>> > --- libavformat/mpegtsenc.c	(revision 10270)
>> > +++ libavformat/mpegtsenc.c	(working copy)
>> > @@ -60,8 +60,8 @@
>> >              b |= 0x40;
>> >          *q++ = b;
>> >          *q++ = s->pid;
>> > +        *q++ = 0x10 | s->cc;
>> >          s->cc = (s->cc + 1) & 0xf;
>> > -        *q++ = 0x10 | s->cc;
>> >          if (first)
>> >              *q++ = 0; /* 0 offset */
>> >          len1 = TS_PACKET_SIZE - (q - packet);
>>
>> Why is this needed?  It only shifts the continuity counter by one.
>
> It'll cause the first cc start from 1 always, vlc will give warning about it.

So fix VLC.

-- 
M?ns Rullg?rd
mans at mansr.com




More information about the ffmpeg-devel mailing list