videodecoder: use new segment earlier for reverse playback
authorThiago Santos <ts.santos@sisa.samsung.com>
Mon, 6 Jan 2014 23:53:15 +0000 (20:53 -0300)
committerThiago Santos <ts.santos@sisa.samsung.com>
Mon, 13 Jan 2014 09:11:09 +0000 (06:11 -0300)
commit5b8e1925b566b57b516c76f12610d42e6ad2b791
tree65f27ab0fea45c7ff6bcc00407c1ddbbceb59882
parent0d66d05c98994214e0c862182d7b23ecbeef2ca8
videodecoder: use new segment earlier for reverse playback

For reverse playback, the segment event will only be pushed when
the first buffer is actually pushed. But for decoding frames and storing
those into the list to be pushed the output_segment.rate value is used
to determine if it is forward or reverse playback.

In case a previous segment event (or none) is in use it will mistakenly
think it is doing forward playback and push the buffers immediatelly and
try to clip buffers based on an old segment (or an uninitialized one, leading
to an assertion)

This patch fixes this by copying the segment earlier if on reverse playback

https://bugzilla.gnome.org/show_bug.cgi?id=721666
gst-libs/gst/video/gstvideodecoder.c