diff options
author | Matthew Waters <matthew@centricular.com> | 2016-02-04 15:07:44 +1100 |
---|---|---|
committer | Matthew Waters <matthew@centricular.com> | 2016-02-04 15:46:22 +1100 |
commit | 3c29dcaddb0996eac5389adeb9214e03e3593058 (patch) | |
tree | 2d0ea432fb161b47677725e3ae11612129dafc0d | |
parent | 0d3cd8274907bef05a8245edd86203b7adcdca11 (diff) | |
download | gstreamer-plugins-bad-3c29dcaddb0996eac5389adeb9214e03e3593058.tar.gz |
amcvideodec: advance the ready counter ourselves when render=FALSE
When not rendering the video frame, e.g. when freeing an unreleased sync frame,
we will not receive a frame listener callback.
Reduces the amount of 'on_frame_available miss detected' messages when dropping
frames.
https://bugzilla.gnome.org/show_bug.cgi?id=761014
-rw-r--r-- | sys/androidmedia/gstamcvideodec.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/androidmedia/gstamcvideodec.c b/sys/androidmedia/gstamcvideodec.c index 36b547a86..4fe216a16 100644 --- a/sys/androidmedia/gstamcvideodec.c +++ b/sys/androidmedia/gstamcvideodec.c @@ -914,11 +914,17 @@ _gl_sync_release_buffer (struct gl_sync *sync, gboolean render) "frames for frame %u", sync, diff, sync->gl_frame_no); } - GST_TRACE ("gl_sync %p release_output_buffer idx %u frame %u", sync, - sync->buffer_idx, sync->gl_frame_no); + GST_TRACE ("gl_sync %p release_output_buffer idx %u frame %u render %s", + sync, sync->buffer_idx, sync->gl_frame_no, render ? "TRUE" : "FALSE"); /* Release the frame into the surface */ sync->sink->gl_released_frame_count++; + if (!render) { + /* Advance the ready counter ourselves if we aren't going to render + * and therefore receive a listener callback */ + sync->sink->gl_ready_frame_count++; + } + if (!gst_amc_codec_release_output_buffer (sync->sink->codec, sync->buffer_idx, render, &error)) { GST_ERROR_OBJECT (sync->sink, |