summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3a4ef90)
raw | patch | inline | side by side (parent: 3a4ef90)
author | Vincent Penquerc'h <vincent.penquerch@collabora.co.uk> | |
Tue, 17 Jul 2012 10:04:45 +0000 (10:04 +0000) | ||
committer | Vincent Penquerc'h <vincent.penquerch@collabora.co.uk> | |
Tue, 17 Jul 2012 10:17:33 +0000 (10:17 +0000) |
For interlaced streams, a decoder may supply a partially filled buffer,
and will set a flag when that buffer is not yet fully filled.
In such a case, we do not want to send it downstream, but wait for it
to be filled before doing so.
Also instruct the codec to force a frame start on flush, just in case.
and will set a flag when that buffer is not yet fully filled.
In such a case, we do not want to send it downstream, but wait for it
to be filled before doing so.
Also instruct the codec to force a frame start on flush, just in case.
src/gstducatividdec.c | patch | blob | history |
diff --git a/src/gstducatividdec.c b/src/gstducatividdec.c
index 3239647942d101588e6a1bf037f80bf15806bf2c..7f3d8a5125c61ef5b54a5c6fcae08fe9a41c1968 100644 (file)
--- a/src/gstducatividdec.c
+++ b/src/gstducatividdec.c
self->outArgs->extendedError, self->status->extendedError);
}
+ /* we now let the codec decide */
+ self->dynParams->newFrameFlag = XDAS_FALSE;
+
+ if (err == XDM_EFAIL || self->outArgs->outBufsInUseFlag)
+ goto skip_outbuf_processing;
+
for (i = 0; i < IVIDEO2_MAX_IO_BUFFERS && self->outArgs->outputID[i]; i++) {
gboolean interlaced;
self->send_crop_event = FALSE;
}
- if (G_UNLIKELY (self->first_out_buffer) && send) {
+ if (G_UNLIKELY (self->first_out_buffer) && send && !self->outArgs->outBufsInUseFlag) {
GstDRMBufferPool *pool;
self->first_out_buffer = FALSE;
gst_drm_buffer_pool_destroy (pool);
}
- if (send) {
+ if (send && !self->outArgs->outBufsInUseFlag) {
GstClockTime ts;
ts = GST_BUFFER_TIMESTAMP (outbuf);
}
}
+skip_outbuf_processing:
for (i = 0; i < IVIDEO2_MAX_IO_BUFFERS && self->outArgs->freeBufID[i]; i++) {
codec_unlock_outbuf (self, self->outArgs->freeBufID[i]);
}
memset (&self->outArgs->outputID, 0, sizeof (self->outArgs->outputID));
memset (&self->outArgs->freeBufID, 0, sizeof (self->outArgs->freeBufID));
+ self->dynParams->newFrameFlag = XDAS_TRUE;
+
/* on a flush, it is normal (and not an error) for the last _process() call
* to return an error..
*/