{"action":"created","issue":{"url":"https://api.github.com/repos/ibooij/big-ring/issues/31","labels_url":"https://api.github.com/repos/ibooij/big-ring/issues/31/labels{/name}","comments_url":"https://api.github.com/repos/ibooij/big-ring/issues/31/comments","events_url":"https://api.github.com/repos/ibooij/big-ring/issues/31/events","html_url":"https://github.com/ibooij/big-ring/pull/31","id":113171461,"number":31,"title":"Feature/sync video","user":{"login":"pajakgdynia","id":6771720,"avatar_url":"https://avatars.githubusercontent.com/u/6771720?v=3","gravatar_id":"","url":"https://api.github.com/users/pajakgdynia","html_url":"https://github.com/pajakgdynia","followers_url":"https://api.github.com/users/pajakgdynia/followers","following_url":"https://api.github.com/users/pajakgdynia/following{/other_user}","gists_url":"https://api.github.com/users/pajakgdynia/gists{/gist_id}","starred_url":"https://api.github.com/users/pajakgdynia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pajakgdynia/subscriptions","organizations_url":"https://api.github.com/users/pajakgdynia/orgs","repos_url":"https://api.github.com/users/pajakgdynia/repos","events_url":"https://api.github.com/users/pajakgdynia/events{/privacy}","received_events_url":"https://api.github.com/users/pajakgdynia/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":16,"created_at":"2015-10-24T16:50:42Z","updated_at":"2015-11-16T08:11:10Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ibooij/big-ring/pulls/31","html_url":"https://github.com/ibooij/big-ring/pull/31","diff_url":"https://github.com/ibooij/big-ring/pull/31.diff","patch_url":"https://github.com/ibooij/big-ring/pull/31.patch"},"body":"A \"bit\" refreshed videoReader, videoPlayer, thumbnailer.\r\nAll frames are synchronized with courses (distance to frame mapping).\r\n\"Strange\" formats works fine (starting frame not 0, frames numbered not by 1, frames with duration).\r\nSeveral simplification.\r\nI thought it will be much simpler.. but life is cruel :)"},"comment":{"url":"https://api.github.com/repos/ibooij/big-ring/issues/comments/156951944","html_url":"https://github.com/ibooij/big-ring/pull/31#issuecomment-156951944","issue_url":"https://api.github.com/repos/ibooij/big-ring/issues/31","id":156951944,"user":{"login":"ibooij","id":420742,"avatar_url":"https://avatars.githubusercontent.com/u/420742?v=3","gravatar_id":"","url":"https://api.github.com/users/ibooij","html_url":"https://github.com/ibooij","followers_url":"https://api.github.com/users/ibooij/followers","following_url":"https://api.github.com/users/ibooij/following{/other_user}","gists_url":"https://api.github.com/users/ibooij/gists{/gist_id}","starred_url":"https://api.github.com/users/ibooij/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ibooij/subscriptions","organizations_url":"https://api.github.com/users/ibooij/orgs","repos_url":"https://api.github.com/users/ibooij/repos","events_url":"https://api.github.com/users/ibooij/events{/privacy}","received_events_url":"https://api.github.com/users/ibooij/received_events","type":"User","site_admin":false},"created_at":"2015-11-16T08:11:10Z","updated_at":"2015-11-16T08:11:10Z","body":"I have found a cause for the `Q_ASSERT(_timeDiff > 0);` crash. \r\n\r\nI have (at least one) video that has the complete first frame in the first packet. In `GenericVideoReader::loadNextFrame()` the value for `_timeDiff` is calculated from the difference between two packets. If the frame comes from the first packet, no value is calculated. \r\n\r\nI added to the last part of `GenericVideoReader::loadNextFrame()` to use a default value for _timeDiff if there is no other way to get the value.\r\n```\r\n// if we had a frame in the first packet, we'll initialize\r\n// _timeDiff to 1 because we don't know any better.\r\nif (_timeDiff == -1) {\r\n    _timeDiff = 1;\r\n}\r\n```\r\n"}}