mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-29 03:30:35 +00:00
videodecoder: Fix initial timestamp in ogg, and a warning.
Don't replace the initial frame's timestamp with a bogus one calculated from the (incorrect for Ogg) frame number just because the 'sync time' hasn't changed. Also, don't output a bogus warning about the output_frame being NULL when it's being dropped/skipped due to QoS.
This commit is contained in:
parent
d9740bf9ba
commit
f865729e95
1 changed files with 5 additions and 5 deletions
|
@ -1774,7 +1774,7 @@ gst_video_decoder_new_frame (GstVideoDecoder * decoder)
|
|||
|
||||
static void
|
||||
gst_video_decoder_prepare_finish_frame (GstVideoDecoder *
|
||||
decoder, GstVideoCodecFrame * frame)
|
||||
decoder, GstVideoCodecFrame * frame, gboolean dropping)
|
||||
{
|
||||
GstVideoDecoderPrivate *priv = decoder->priv;
|
||||
GList *l, *events = NULL;
|
||||
|
@ -1816,7 +1816,7 @@ gst_video_decoder_prepare_finish_frame (GstVideoDecoder *
|
|||
|
||||
/* If the frame is meant to be outputted but we don't have an output buffer
|
||||
* we have a problem :) */
|
||||
if (G_UNLIKELY (frame->output_buffer == NULL))
|
||||
if (G_UNLIKELY ((frame->output_buffer == NULL) && !dropping))
|
||||
goto no_output_buffer;
|
||||
|
||||
if (GST_CLOCK_TIME_IS_VALID (frame->pts)) {
|
||||
|
@ -1826,7 +1826,7 @@ gst_video_decoder_prepare_finish_frame (GstVideoDecoder *
|
|||
GST_TIME_ARGS (frame->pts),
|
||||
GST_TIME_ARGS (frame->pts - decoder->output_segment.start));
|
||||
priv->timestamp_offset = frame->pts;
|
||||
} else {
|
||||
} else if (GST_CLOCK_TIME_IS_VALID (priv->last_timestamp)) {
|
||||
/* This case is for one initial timestamp and no others, e.g.,
|
||||
* filesrc ! decoder ! xvimagesink */
|
||||
GST_WARNING_OBJECT (decoder, "sync timestamp didn't change, ignoring");
|
||||
|
@ -1912,7 +1912,7 @@ gst_video_decoder_drop_frame (GstVideoDecoder * dec, GstVideoCodecFrame * frame)
|
|||
|
||||
GST_VIDEO_DECODER_STREAM_LOCK (dec);
|
||||
|
||||
gst_video_decoder_prepare_finish_frame (dec, frame);
|
||||
gst_video_decoder_prepare_finish_frame (dec, frame, TRUE);
|
||||
|
||||
GST_DEBUG_OBJECT (dec, "dropping frame %" GST_TIME_FORMAT,
|
||||
GST_TIME_ARGS (frame->pts));
|
||||
|
@ -1976,7 +1976,7 @@ gst_video_decoder_finish_frame (GstVideoDecoder * decoder,
|
|||
|
||||
GST_VIDEO_DECODER_STREAM_LOCK (decoder);
|
||||
|
||||
gst_video_decoder_prepare_finish_frame (decoder, frame);
|
||||
gst_video_decoder_prepare_finish_frame (decoder, frame, FALSE);
|
||||
priv->processed++;
|
||||
/* no buffer data means this frame is skipped */
|
||||
if (!frame->output_buffer || GST_VIDEO_CODEC_FRAME_IS_DECODE_ONLY (frame)) {
|
||||
|
|
Loading…
Reference in a new issue