summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2014-03-29 10:16:12 +0100
committerSebastian Dröge <sebastian@centricular.com>2014-03-29 10:32:25 +0100
commita76db74496ec139da723e34cd384edf073f91a06 (patch)
tree812ce33b1372fa8ed7b1e3009ce968c9c3d53e6e /libs
parentf85ce91e9d148fde9e8774c64f129f912a1e47ff (diff)
downloadgstreamer-a76db74496ec139da723e34cd384edf073f91a06.tar.gz
baseparse: Fix splitting and reversing of GOPs in reverse playback mode
We iterate the current discont group backwards and push each GOP forwards, starting from the last one. However if the first buffer in the current discont group is a keyframe, we will keep it around until next time, which is far from ideal. Just push it.
Diffstat (limited to 'libs')
-rw-r--r--libs/gst/base/gstbaseparse.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libs/gst/base/gstbaseparse.c b/libs/gst/base/gstbaseparse.c
index e99b7bc2b4..bc5a513881 100644
--- a/libs/gst/base/gstbaseparse.c
+++ b/libs/gst/base/gstbaseparse.c
@@ -2669,8 +2669,10 @@ gst_base_parse_finish_fragment (GstBaseParse * parse, gboolean prev_head)
parse->priv->buffers_queued);
}
- /* audio may have all marked as keyframe, so arrange to send here */
- if (!seen_delta)
+ /* audio may have all marked as keyframe, so arrange to send here. Also
+ * we might have ended the loop above on a keyframe, in which case we
+ * should */
+ if (!seen_delta || seen_key)
ret = gst_base_parse_send_buffers (parse);
/* any trailing unused no longer usable (ideally none) */