[FFmpeg-cvslog] r25383 - in trunk: libavformat/mpegenc.c tests/ref/lavf/mpg
Michael Niedermayer
michaelni
Thu Oct 7 20:39:43 CEST 2010
On Thu, Oct 07, 2010 at 11:21:50AM -0700, Baptiste Coudurier wrote:
> On 10/07/2010 03:02 AM, Michael Niedermayer wrote:
>> On Wed, Oct 06, 2010 at 08:11:18PM -0700, Baptiste Coudurier wrote:
>>> On 10/6/10 7:35 PM, Michael Niedermayer wrote:
>>>> On Wed, Oct 06, 2010 at 05:40:30PM -0700, Baptiste Coudurier wrote:
>>>>> Michael,
>>>>>
>>>>> On 10/06/2010 05:32 PM, michael wrote:
>>>>>> Author: michael
>>>>>> Date: Thu Oct 7 02:32:22 2010
>>>>>> New Revision: 25383
>>>>>>
>>>>>> Log:
>>>>>> Init SCR in mpeg muxer based on first DTS.
>>>>>> This fixes issues if the first DTS is far away from 0.
>>>>>>
>>>>>> Modified:
>>>>>> trunk/libavformat/mpegenc.c
>>>>>> trunk/tests/ref/lavf/mpg
>>>>>>
>>>>>> Modified: trunk/libavformat/mpegenc.c
>>>>>> ==============================================================================
>>>>>> --- trunk/libavformat/mpegenc.c Wed Oct 6 23:43:46 2010 (r25382)
>>>>>> +++ trunk/libavformat/mpegenc.c Thu Oct 7 02:32:22 2010 (r25383)
>>>>>> @@ -1160,6 +1160,8 @@ static int mpeg_mux_write_packet(AVForma
>>>>>>
>>>>>> pts= pkt->pts;
>>>>>> dts= pkt->dts;
>>>>>> + if(!s->last_scr)
>>>>>> + s->last_scr= dts;
>>>>>
>>>>> dts is negative for the first frame where there is delay
>>>>> negative in PS/TS -> very big
>>>>
>>>> yes, is that a problem? or rather where do you see the problem?
>>>>
>>>
>>> This means scr would always wrap after the first frame. I'd rather have
>>
>> i see that this is not exactly pretty but it shouldnt really be an issue as
>> wraparound is allowed.
>>
>>
>>> the scr inited to dts+preload, but maybe I'm overlooking something.
>>
>> preload means the time the demuxer preloads its buffers before playing.
>> that is the difference between SCR (sent/receive time) and DTS(decode time)
>> we of course could add a second constant to both, someone will probably
>> eventually complain about all that, something along the lines of we arent
>> storing the timestamps passed to the muxer but munge them ...
>
> Btw, that's what the TS muxer do, because the wrapping of the PCR causes
> problems with some players. so the PCR starts at preload and dts at
> preload*2
feel free to commit such change to PS too
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Its not that you shouldnt use gotos but rather that you should write
readable code and code with gotos often but not always is less readable
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-cvslog/attachments/20101007/c844af06/attachment.pgp>
More information about the ffmpeg-cvslog
mailing list