diff options
author | Luo Jinghua <sunmoon1997@gmail.com> | 2009-09-18 15:57:35 +0800 |
---|---|---|
committer | Luo Jinghua <sunmoon1997@gmail.com> | 2009-09-18 17:41:36 +0800 |
commit | a7318defa37c18e5e64d03559cf52aec3172c79d (patch) | |
tree | 50da694ad46e6d66417bcd90d90b409d826aa1d7 | |
parent | 351c203d216335b77dd88a2350d5f2b7148ee458 (diff) |
pmpdemux: actually seek to previous key frame0.0.2
-rw-r--r-- | src/gstpmpdemux.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gstpmpdemux.c b/src/gstpmpdemux.c index ec25500..09503ba 100644 --- a/src/gstpmpdemux.c +++ b/src/gstpmpdemux.c @@ -990,8 +990,8 @@ gst_pmpdemux_loop_state_indices (GstPmpdemux * pmpdemux) return ret; } -/* Seeks to the previous keyframe of the indexed stream and - * aligns other streams with respect to the keyframe timestamp +/* Seeks to the previous keyframe of the indexed stream and + * aligns other streams with respect to the keyframe timestamp * of indexed stream. Only called in case of Reverse Playback */ static GstFlowReturn @@ -1012,6 +1012,9 @@ gst_pmpdemux_seek_to_previous_keyframe (GstPmpdemux * pmpdemux) } ref_str->sample_index--; + while (ref_str->sample_index > 0 && + !(pmpdemux->samples[ref_str->sample_index].size & 1)) + ref_str->sample_index--; for (i = 1; i < pmpdemux->n_samples; i++) pmpdemux->streams[i]->sample_index = ref_str->sample_index; |