lwlibav: Shift the current frame number in order to match DTS.
lwlibav: Add NULL dereference check for the index helpers.

The helpers are not allocated for non-Audio/Visual streams.