diff options
| author | Wim Taymans <wim.taymans@collabora.co.uk> | 2010-09-23 16:46:31 +0200 |
|---|---|---|
| committer | Wim Taymans <wim.taymans@collabora.co.uk> | 2010-09-23 16:46:31 +0200 |
| commit | 9e7b890a22507f06a34ed7f7956fb02392348187 (patch) | |
| tree | 8bc9bf9f7006d0e481ef5e9dd11409635ea1e7ba | |
| parent | 77f02c2d7e8b3c8e320573e0abeea474e10a2ea7 (diff) | |
flvdemux: parse and use cts
For H264, there is an extra header containing the CTS, which is a timestamp
offset that should be applied to the PTS. Parse this value and use it to adjust
the pts.
Fixes #630088
| -rw-r--r-- | gst/flv/gstflvdemux.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gst/flv/gstflvdemux.c b/gst/flv/gstflvdemux.c index 404993917..e22eca7d8 100644 --- a/gst/flv/gstflvdemux.c +++ b/gst/flv/gstflvdemux.c @@ -1084,7 +1084,16 @@ gst_flv_demux_parse_tag_video (GstFlvDemux * demux, GstBuffer * buffer) if (codec_tag == 4 || codec_tag == 5) { codec_data = 2; } else if (codec_tag == 7) { + gint32 cts; + codec_data = 5; + + cts = GST_READ_UINT24_BE (data + 9); + cts = (cts + 0xff800000) ^ 0xff800000; + + GST_LOG_OBJECT (demux, "got cts %d", cts); + + pts = pts + cts; } GST_LOG_OBJECT (demux, "video tag with codec tag %u, keyframe (%d) " |
