[FFmpeg-devel] [PATCH] flv muxer timestamp fix

Vladimir Pantelic vladoman
Fri Jan 28 19:03:56 CET 2011


On 01/28/2011 01:54 PM, Benjamin Larsson wrote:
> When streaming flv's with ffserver there is a timestamp jump in the
> beginning of the stream caused by the timestamp in the header to always
> start at 0. This patch fixes this by measuring between the current and
> previous timestamp and if it is to large it biases the timestamp so they
> are offset by a constant and thus removing the jump in timestamp.


+    last_ts = flv->last_ts;
+    flv->last_ts = ts;
+    if (ts - last_ts > 10000)
+        flv->ts_offset = ts - last_ts - 1;
+

10000 means 10 seconds? or is the flv timebase less than 1ms?



More information about the ffmpeg-devel mailing list