mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-20 00:31:13 +00:00
basevideodecoder: add option to hande alt frame data
altref/invisible 'frame' do not describe some frame directly, so it can't be displayed and timestamps should not be updated. Fix bug: https://bugzilla.gnome.org/show_bug.cgi?id=655245 Signed-off-by: Oleksij Rempel (Alexey Fisher) <bug-track@fisher-privat.net>
This commit is contained in:
parent
360cbaa46c
commit
1d0507af89
2 changed files with 10 additions and 1 deletions
|
@ -124,6 +124,10 @@ struct _GstVideoFrame
|
||||||
gboolean is_sync_point;
|
gboolean is_sync_point;
|
||||||
gboolean is_eos;
|
gboolean is_eos;
|
||||||
|
|
||||||
|
/* Frames that should not be pushed downstream and are
|
||||||
|
* not meant for display */
|
||||||
|
gboolean decode_only;
|
||||||
|
|
||||||
GstBuffer *sink_buffer;
|
GstBuffer *sink_buffer;
|
||||||
GstBuffer *src_buffer;
|
GstBuffer *src_buffer;
|
||||||
|
|
||||||
|
|
|
@ -1411,6 +1411,11 @@ gst_base_video_decoder_prepare_finish_frame (GstBaseVideoDecoder *
|
||||||
}
|
}
|
||||||
g_list_free (events);
|
g_list_free (events);
|
||||||
|
|
||||||
|
/* Check if the data should not be displayed. For example altref/invisible
|
||||||
|
* frame in vp8. In this case we should not update the timestamps. */
|
||||||
|
if (frame->decode_only)
|
||||||
|
return;
|
||||||
|
|
||||||
if (GST_CLOCK_TIME_IS_VALID (frame->presentation_timestamp)) {
|
if (GST_CLOCK_TIME_IS_VALID (frame->presentation_timestamp)) {
|
||||||
if (frame->presentation_timestamp != base_video_decoder->timestamp_offset) {
|
if (frame->presentation_timestamp != base_video_decoder->timestamp_offset) {
|
||||||
GST_DEBUG_OBJECT (base_video_decoder,
|
GST_DEBUG_OBJECT (base_video_decoder,
|
||||||
|
@ -1564,7 +1569,7 @@ gst_base_video_decoder_finish_frame (GstBaseVideoDecoder * base_video_decoder,
|
||||||
base_video_decoder->processed++;
|
base_video_decoder->processed++;
|
||||||
|
|
||||||
/* no buffer data means this frame is skipped */
|
/* no buffer data means this frame is skipped */
|
||||||
if (!frame->src_buffer) {
|
if (!frame->src_buffer || frame->decode_only) {
|
||||||
GST_DEBUG_OBJECT (base_video_decoder, "skipping frame %" GST_TIME_FORMAT,
|
GST_DEBUG_OBJECT (base_video_decoder, "skipping frame %" GST_TIME_FORMAT,
|
||||||
GST_TIME_ARGS (frame->presentation_timestamp));
|
GST_TIME_ARGS (frame->presentation_timestamp));
|
||||||
goto done;
|
goto done;
|
||||||
|
|
Loading…
Reference in a new issue