[FFmpeg-devel] [PATCH] timestamp discontinuity in subtitles is OK

Wolfram Gloger wmglo
Mon Oct 6 00:23:03 CEST 2008


Hi,

> carefull, you are missing a few issues here

Possibly..

> the first being b frame reordering (if the code is used for video)

AFAICS the current code does:

next_pts = (current_dts if valid, else last_pts) + (computed pkt duration)

so may I ask 2 questions:

- how is this affected by B frames (pts!=dts)?

- why is a manually computed offset added rather than pkt.duration?

> second being that this isnt strictly correct nor what i suggested,
> its not making the discontinuity code check the last duration it
> changes next_pts which really is used for more than discontinuity
> detection.
> third, while AVPacket =3D=3D decoder packet whenever possible this is not
> always possible, when its not next_pts is the variable that keeps track
> of the next pts and this is needed even when duration=3D=3D0

OK -- if that's the case, how about remembering a "last duration" per
stream and looking at that in the discontinuity check?

Regards,
Wolfram.




More information about the ffmpeg-devel mailing list