Fix tng_num_frame_sets_get() with no frame sets.

When there are no frame sets the function returned an error.
This corresponds to commit 6f7862c7406b in the TNG repository.

Fixes #1540

Change-Id: I3df04d84ebd8fcdc6be76a446efa3209df363d23
Fix bug causing reading next frame not to stop.

Corresponds to commit e6e85d562829bca in the TNG repo.

Change-Id: I89ee3e7649c4cf832798d9e2ce61b397a1757579