[Ffmpeg-devel] Real-time mpegts encoding and streaming

Måns Rullgård mans
Fri Mar 2 22:48:04 CET 2007


Luca Abeni <lucabe72 at email.it> writes:

> Hi M?ns,
>
> On Fri, 2007-03-02 at 20:33 +0000, M?ns Rullg?rd wrote:
> [...]
>> Why not something like this:
>> 
>>     header_len = 3;
>>     flags = 0;
>>     if(pts != AV_NOPTS_VALUE){
>>         header_len += 5;
>>         flags |= 0x80;
>>     }
>>     if(dts != AV_NOPTS_VALUE){
>>         header_len += 5;
>>         flags |= 0x40;
>>     }
>>     *q++ = flags;
>>     *q++ = header_len;
>>     /* maybe write pts */
>>     /* maybe write dts */
> Ok, I had to change the file a little bit more, but now it looks
> better. 

Committed something even better-looking.

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




More information about the ffmpeg-devel mailing list