Use the frame id to match the output forced keyframe with
the event that forced it.
https://bugzilla.gnome.org/show_bug.cgi?id=706885
gboolean pending; /* TRUE if this was requested already */
gboolean all_headers;
guint count;
+ guint32 frame_id;
};
static void
}
if (fevt) {
+ fevt->frame_id = frame->system_frame_number;
GST_DEBUG_OBJECT (encoder,
"Forcing a key unit at running time %" GST_TIME_FORMAT,
GST_TIME_ARGS (running_time));
if (!tmp->pending)
continue;
+ /* Exact match using the frame id */
+ if (frame->system_frame_number == tmp->frame_id) {
+ fevt = tmp;
+ break;
+ }
+
/* Simple case, keyunit ASAP */
if (tmp->running_time == GST_CLOCK_TIME_NONE) {
fevt = tmp;