hlsdemux: fix reverse playback seek with snap flags
authorThiago Santos <thiagoss@osg.samsung.com>
Tue, 5 Jan 2016 12:16:45 +0000 (09:16 -0300)
committerThiago Santos <thiagoss@osg.samsung.com>
Wed, 6 Jan 2016 13:23:13 +0000 (10:23 -0300)
commitbf57be7fc7eb94c77ff385b870a8db8c2ff65437
tree904446c05a06a30f8bf6fd50473a4025b8121335
parentbf272edaf34d93296fc28ef330cb7ff3b1859b4c
hlsdemux: fix reverse playback seek with snap flags

Properly handle snap flags during reverse seeking. In this case
the before/after are also reversed, so handle those as such.

For example: with a sequence of 1s fragments:

|-- 0 --|-- 1 --|-- 2 --|-- 3 --|

If you seek to 1.5s it is inside fragment 1. With reverse and

snap-before: should play from the end of fragment 1
snap-after: should play from the end of fragment 0
ext/hls/gsthlsdemux.c