diff options
author | Alexey Fisher <bug-track@fisher-privat.net> | 2011-06-26 15:15:54 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2011-06-26 16:56:33 +0200 |
commit | d1fe501eb735d866a6f1899154b82d5f09838bf3 (patch) | |
tree | 6144c4dfb3aa0eb53993130c95b61e17d67ea31f /ext | |
parent | f0224088c7c72c0ed2bb856c1b6cb0968e7d08cf (diff) |
vp8enc: generate a timestamp for alt-ref frames.
It will fix handling of altref/invisible frames since matroska-mux
drop any fram with no timestamp.
see also:
http://www.webmproject.org/code/specs/container/
The encoder will currently set the AR's timestamp as close as possible
to the previous frame while attempting to provide a timestamp that is
strictly increasing. In cases where the time base given to the encoder
at configure time is not granular enough to allow for this the AR
will share the same timestamp as D, but should be
treated as having no duration.
Fixes bug #652951
Signed-off-by: Alexey Fisher <bug-track@fisher-privat.net>
Diffstat (limited to 'ext')
-rw-r--r-- | ext/vp8/gstvp8enc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/vp8/gstvp8enc.c b/ext/vp8/gstvp8enc.c index ad6a282be..6f65d955e 100644 --- a/ext/vp8/gstvp8enc.c +++ b/ext/vp8/gstvp8enc.c @@ -939,6 +939,8 @@ gst_vp8_enc_shape_output (GstBaseVideoEncoder * base_video_encoder, encoder->keyframe_distance++; } + GST_BUFFER_TIMESTAMP (buf) = GST_BUFFER_TIMESTAMP (frame->src_buffer); + GST_BUFFER_DURATION (buf) = 0; GST_BUFFER_OFFSET_END (buf) = _to_granulepos (frame->presentation_frame_number + 1, inv_count, encoder->keyframe_distance); |