[FFmpeg-devel] [PATCH] Re: movenc.c: Allow MPEG2.mov playable under QuickTime Player

Baptiste Coudurier baptiste.coudurier
Fri Feb 11 06:51:57 CET 2011


Hi,

On 2/10/11 9:35 PM, Takashi Mochizuki wrote:
> Baptiste-san,
> 
>> I think the following is even more simpler:
> 
> Oh my... I agree now. Thank you. Patch is updated.

Thanks, could you please split the patch and just have this one hunk.
It can be applied right now.

>> What's the other change about ?
>> If it's about missing pts, you can compute it correctly from the other 
>> samples, mpeg-2 reordering is simple.
> 
> Yes, this patch is for:
>  - Mark first sample as sync for OpenGOP MPEG2
>  - Treat NOPTS P-frame in MPEG2 stream correctly
> 
> I am not sure more simpler way to calculate delayed frame's pts value.
> Would you please give me any idea?

Since we parse the mpeg2 frame and retrieve the picture type,
you can set pts == dts for b frames, for P and I you can compute the pts
from either the temp_ref or by counting the number of b frames after,
although I think the temp_ref is the correct way.

Note this can also be used when in mp4 mode.

-- 
Baptiste COUDURIER
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
FFmpeg maintainer                                  http://www.ffmpeg.org



More information about the ffmpeg-devel mailing list