{"action":"created","comment":{"url":"https://api.github.com/repos/kode54/vgmstream/pulls/comments/104322104","pull_request_review_id":25154375,"id":104322104,"diff_hunk":"@@ -70,24 +70,23 @@ VGMSTREAM * init_vgmstream_ps3_sgdx(STREAMFILE *streamFile) {\n \r\n \r\n     /* WAVE chunk (size 0x10 + files * 0x38 + optional padding) */\r\n-    /*  the format reads chunks until header_size, but we only want WAVE in the first position meaning BGM */\r\n-    if (read_32bitBE(0x10,streamHeader) != 0x57415645)  /* \"WAVE\" */\r\n-        goto fail;\r\n-    /* 0x04  SGX: unknown; SGD/SGH: chunk length */\r\n-    /* 0x08  null */\r\n-\r\n-    /* validate multi-streams (usually only SE containers) */\r\n-    {\r\n-        int total_streams = read_32bitLE(0x1c,streamHeader);\r\n-        VGM_ASSERT(total_streams > 1, \"SGXD: multiple streams found (%i entries)\\n\", total_streams);\r\n-        if (target_stream == 0) target_stream = 1; /* auto: default to 1 */\r\n-        if (target_stream > total_streams) goto fail;\r\n+    /* 0x04  SGX: unknown; SGD/SGH: chunk length,  0x08  null */\r\n+    if (is_sgx) { /* position after chunk+size */\r\n+        if (read_32bitBE(0x10,streamHeader) != 0x57415645) goto fail;  /* \"WAVE\" */\r\n+        chunk_offset = 0x18;\r\n+    } else {\r\n+        if (!find_chunk_le(streamHeader, 0x57415645,0x10,0, &chunk_offset,NULL)) goto fail; /* \"WAVE\" */\r\n     }\r\n \r\n+    /* check multi-streams (usually only SE containers; Puppeteer) */\r\n+    total_streams = read_32bitLE(chunk_offset+0x04,streamHeader);\r\n+    if (target_stream == 0) target_stream = 1;\r","path":"src/meta/ps3_sgh_sgb.c","position":53,"original_position":53,"commit_id":"0e658031cc23bf96e63f71322124b59a5dbabb78","original_commit_id":"0e658031cc23bf96e63f71322124b59a5dbabb78","user":{"login":"kode54","id":796316,"avatar_url":"https://avatars1.githubusercontent.com/u/796316?v=3","gravatar_id":"","url":"https://api.github.com/users/kode54","html_url":"https://github.com/kode54","followers_url":"https://api.github.com/users/kode54/followers","following_url":"https://api.github.com/users/kode54/following{/other_user}","gists_url":"https://api.github.com/users/kode54/gists{/gist_id}","starred_url":"https://api.github.com/users/kode54/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kode54/subscriptions","organizations_url":"https://api.github.com/users/kode54/orgs","repos_url":"https://api.github.com/users/kode54/repos","events_url":"https://api.github.com/users/kode54/events{/privacy}","received_events_url":"https://api.github.com/users/kode54/received_events","type":"User","site_admin":false},"body":"Huh?","created_at":"2017-03-05T19:41:56Z","updated_at":"2017-03-05T19:41:56Z","html_url":"https://github.com/kode54/vgmstream/pull/72#discussion_r104322104","pull_request_url":"https://api.github.com/repos/kode54/vgmstream/pulls/72","_links":{"self":{"href":"https://api.github.com/repos/kode54/vgmstream/pulls/comments/104322104"},"html":{"href":"https://github.com/kode54/vgmstream/pull/72#discussion_r104322104"},"pull_request":{"href":"https://api.github.com/repos/kode54/vgmstream/pulls/72"}}},"pull_request":{"url":"https://api.github.com/repos/kode54/vgmstream/pulls/72","id":109155476,"html_url":"https://github.com/kode54/vgmstream/pull/72","diff_url":"https://github.com/kode54/vgmstream/pull/72.diff","patch_url":"https://github.com/kode54/vgmstream/pull/72.patch","issue_url":"https://api.github.com/repos/kode54/vgmstream/issues/72","number":72,"state":"open","locked":false,"title":"Stuff","user":{"login":"bnnm","id":22844311,"avatar_url":"https://avatars3.githubusercontent.com/u/22844311?v=3","gravatar_id":"","url":"https://api.github.com/users/bnnm","html_url":"https://github.com/bnnm","followers_url":"https://api.github.com/users/bnnm/followers","following_url":"https://api.github.com/users/bnnm/following{/other_user}","gists_url":"https://api.github.com/users/bnnm/gists{/gist_id}","starred_url":"https://api.github.com/users/bnnm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bnnm/subscriptions","organizations_url":"https://api.github.com/users/bnnm/orgs","repos_url":"https://api.github.com/users/bnnm/repos","events_url":"https://api.github.com/users/bnnm/events{/privacy}","received_events_url":"https://api.github.com/users/bnnm/received_events","type":"User","site_admin":false},"body":"- Fixed some XWB XACT2 looping [Blue Dragon, Prey]\r\n- Added basic multi-stream FSB5 support\r\n- Added SFX SGDX support\r\n- Shows stream numbers in the description (few multi-stream formats only)","created_at":"2017-03-05T16:50:52Z","updated_at":"2017-03-05T19:41:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f87854ed8b6d5c42658639b20a9cd240a1068b41","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/kode54/vgmstream/pulls/72/commits","review_comments_url":"https://api.github.com/repos/kode54/vgmstream/pulls/72/comments","review_comment_url":"https://api.github.com/repos/kode54/vgmstream/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kode54/vgmstream/issues/72/comments","statuses_url":"https://api.github.com/repos/kode54/vgmstream/statuses/0e658031cc23bf96e63f71322124b59a5dbabb78","head":{"label":"bnnm:stuff","ref":"stuff","sha":"0e658031cc23bf96e63f71322124b59a5dbabb78","user":{"login":"bnnm","id":22844311,"avatar_url":"https://avatars3.githubusercontent.com/u/22844311?v=3","gravatar_id":"","url":"https://api.github.com/users/bnnm","html_url":"https://github.com/bnnm","followers_url":"https://api.github.com/users/bnnm/followers","following_url":"https://api.github.com/users/bnnm/following{/other_user}","gists_url":"https://api.github.com/users/bnnm/gists{/gist_id}","starred_url":"https://api.github.com/users/bnnm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bnnm/subscriptions","organizations_url":"https://api.github.com/users/bnnm/orgs","repos_url":"https://api.github.com/users/bnnm/repos","events_url":"https://api.github.com/users/bnnm/events{/privacy}","received_events_url":"https://api.github.com/users/bnnm/received_events","type":"User","site_admin":false},"repo":{"id":72032881,"name":"vgmstream","full_name":"bnnm/vgmstream","owner":{"login":"bnnm","id":22844311,"avatar_url":"https://avatars3.githubusercontent.com/u/22844311?v=3","gravatar_id":"","url":"https://api.github.com/users/bnnm","html_url":"https://github.com/bnnm","followers_url":"https://api.github.com/users/bnnm/followers","following_url":"https://api.github.com/users/bnnm/following{/other_user}","gists_url":"https://api.github.com/users/bnnm/gists{/gist_id}","starred_url":"https://api.github.com/users/bnnm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bnnm/subscriptions","organizations_url":"https://api.github.com/users/bnnm/orgs","repos_url":"https://api.github.com/users/bnnm/repos","events_url":"https://api.github.com/users/bnnm/events{/privacy}","received_events_url":"https://api.github.com/users/bnnm/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bnnm/vgmstream","description":"Git clone of the vgmstream - A library for playback of various streamed audio formats used in video games.","fork":true,"url":"https://api.github.com/repos/bnnm/vgmstream","forks_url":"https://api.github.com/repos/bnnm/vgmstream/forks","keys_url":"https://api.github.com/repos/bnnm/vgmstream/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bnnm/vgmstream/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bnnm/vgmstream/teams","hooks_url":"https://api.github.com/repos/bnnm/vgmstream/hooks","issue_events_url":"https://api.github.com/repos/bnnm/vgmstream/issues/events{/number}","events_url":"https://api.github.com/repos/bnnm/vgmstream/events","assignees_url":"https://api.github.com/repos/bnnm/vgmstream/assignees{/user}","branches_url":"https://api.github.com/repos/bnnm/vgmstream/branches{/branch}","tags_url":"https://api.github.com/repos/bnnm/vgmstream/tags","blobs_url":"https://api.github.com/repos/bnnm/vgmstream/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bnnm/vgmstream/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bnnm/vgmstream/git/refs{/sha}","trees_url":"https://api.github.com/repos/bnnm/vgmstream/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bnnm/vgmstream/statuses/{sha}","languages_url":"https://api.github.com/repos/bnnm/vgmstream/languages","stargazers_url":"https://api.github.com/repos/bnnm/vgmstream/stargazers","contributors_url":"https://api.github.com/repos/bnnm/vgmstream/contributors","subscribers_url":"https://api.github.com/repos/bnnm/vgmstream/subscribers","subscription_url":"https://api.github.com/repos/bnnm/vgmstream/subscription","commits_url":"https://api.github.com/repos/bnnm/vgmstream/commits{/sha}","git_commits_url":"https://api.github.com/repos/bnnm/vgmstream/git/commits{/sha}","comments_url":"https://api.github.com/repos/bnnm/vgmstream/comments{/number}","issue_comment_url":"https://api.github.com/repos/bnnm/vgmstream/issues/comments{/number}","contents_url":"https://api.github.com/repos/bnnm/vgmstream/contents/{+path}","compare_url":"https://api.github.com/repos/bnnm/vgmstream/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bnnm/vgmstream/merges","archive_url":"https://api.github.com/repos/bnnm/vgmstream/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bnnm/vgmstream/downloads","issues_url":"https://api.github.com/repos/bnnm/vgmstream/issues{/number}","pulls_url":"https://api.github.com/repos/bnnm/vgmstream/pulls{/number}","milestones_url":"https://api.github.com/repos/bnnm/vgmstream/milestones{/number}","notifications_url":"https://api.github.com/repos/bnnm/vgmstream/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bnnm/vgmstream/labels{/name}","releases_url":"https://api.github.com/repos/bnnm/vgmstream/releases{/id}","deployments_url":"https://api.github.com/repos/bnnm/vgmstream/deployments","created_at":"2016-10-26T18:33:16Z","updated_at":"2016-10-26T18:33:19Z","pushed_at":"2017-03-05T16:46:53Z","git_url":"git://github.com/bnnm/vgmstream.git","ssh_url":"git@github.com:bnnm/vgmstream.git","clone_url":"https://github.com/bnnm/vgmstream.git","svn_url":"https://github.com/bnnm/vgmstream","homepage":null,"size":7485,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"kode54:master","ref":"master","sha":"59c2a57ecf8fa186be373106a9fd27120daf6f86","user":{"login":"kode54","id":796316,"avatar_url":"https://avatars1.githubusercontent.com/u/796316?v=3","gravatar_id":"","url":"https://api.github.com/users/kode54","html_url":"https://github.com/kode54","followers_url":"https://api.github.com/users/kode54/followers","following_url":"https://api.github.com/users/kode54/following{/other_user}","gists_url":"https://api.github.com/users/kode54/gists{/gist_id}","starred_url":"https://api.github.com/users/kode54/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kode54/subscriptions","organizations_url":"https://api.github.com/users/kode54/orgs","repos_url":"https://api.github.com/users/kode54/repos","events_url":"https://api.github.com/users/kode54/events{/privacy}","received_events_url":"https://api.github.com/users/kode54/received_events","type":"User","site_admin":false},"repo":{"id":5591410,"name":"vgmstream","full_name":"kode54/vgmstream","owner":{"login":"kode54","id":796316,"avatar_url":"https://avatars1.githubusercontent.com/u/796316?v=3","gravatar_id":"","url":"https://api.github.com/users/kode54","html_url":"https://github.com/kode54","followers_url":"https://api.github.com/users/kode54/followers","following_url":"https://api.github.com/users/kode54/following{/other_user}","gists_url":"https://api.github.com/users/kode54/gists{/gist_id}","starred_url":"https://api.github.com/users/kode54/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kode54/subscriptions","organizations_url":"https://api.github.com/users/kode54/orgs","repos_url":"https://api.github.com/users/kode54/repos","events_url":"https://api.github.com/users/kode54/events{/privacy}","received_events_url":"https://api.github.com/users/kode54/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kode54/vgmstream","description":"Git clone of the vgmstream - A library for playback of various streamed audio formats used in video games.","fork":false,"url":"https://api.github.com/repos/kode54/vgmstream","forks_url":"https://api.github.com/repos/kode54/vgmstream/forks","keys_url":"https://api.github.com/repos/kode54/vgmstream/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kode54/vgmstream/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kode54/vgmstream/teams","hooks_url":"https://api.github.com/repos/kode54/vgmstream/hooks","issue_events_url":"https://api.github.com/repos/kode54/vgmstream/issues/events{/number}","events_url":"https://api.github.com/repos/kode54/vgmstream/events","assignees_url":"https://api.github.com/repos/kode54/vgmstream/assignees{/user}","branches_url":"https://api.github.com/repos/kode54/vgmstream/branches{/branch}","tags_url":"https://api.github.com/repos/kode54/vgmstream/tags","blobs_url":"https://api.github.com/repos/kode54/vgmstream/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kode54/vgmstream/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kode54/vgmstream/git/refs{/sha}","trees_url":"https://api.github.com/repos/kode54/vgmstream/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kode54/vgmstream/statuses/{sha}","languages_url":"https://api.github.com/repos/kode54/vgmstream/languages","stargazers_url":"https://api.github.com/repos/kode54/vgmstream/stargazers","contributors_url":"https://api.github.com/repos/kode54/vgmstream/contributors","subscribers_url":"https://api.github.com/repos/kode54/vgmstream/subscribers","subscription_url":"https://api.github.com/repos/kode54/vgmstream/subscription","commits_url":"https://api.github.com/repos/kode54/vgmstream/commits{/sha}","git_commits_url":"https://api.github.com/repos/kode54/vgmstream/git/commits{/sha}","comments_url":"https://api.github.com/repos/kode54/vgmstream/comments{/number}","issue_comment_url":"https://api.github.com/repos/kode54/vgmstream/issues/comments{/number}","contents_url":"https://api.github.com/repos/kode54/vgmstream/contents/{+path}","compare_url":"https://api.github.com/repos/kode54/vgmstream/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kode54/vgmstream/merges","archive_url":"https://api.github.com/repos/kode54/vgmstream/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kode54/vgmstream/downloads","issues_url":"https://api.github.com/repos/kode54/vgmstream/issues{/number}","pulls_url":"https://api.github.com/repos/kode54/vgmstream/pulls{/number}","milestones_url":"https://api.github.com/repos/kode54/vgmstream/milestones{/number}","notifications_url":"https://api.github.com/repos/kode54/vgmstream/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kode54/vgmstream/labels{/name}","releases_url":"https://api.github.com/repos/kode54/vgmstream/releases{/id}","deployments_url":"https://api.github.com/repos/kode54/vgmstream/deployments","created_at":"2012-08-28T20:08:24Z","updated_at":"2017-02-10T03:30:22Z","pushed_at":"2017-03-05T16:50:52Z","git_url":"git://github.com/kode54/vgmstream.git","ssh_url":"git@github.com:kode54/vgmstream.git","clone_url":"https://github.com/kode54/vgmstream.git","svn_url":"https://github.com/kode54/vgmstream","homepage":null,"size":7405,"stargazers_count":46,"watchers_count":46,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":21,"mirror_url":null,"open_issues_count":10,"forks":21,"open_issues":10,"watchers":46,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kode54/vgmstream/pulls/72"},"html":{"href":"https://github.com/kode54/vgmstream/pull/72"},"issue":{"href":"https://api.github.com/repos/kode54/vgmstream/issues/72"},"comments":{"href":"https://api.github.com/repos/kode54/vgmstream/issues/72/comments"},"review_comments":{"href":"https://api.github.com/repos/kode54/vgmstream/pulls/72/comments"},"review_comment":{"href":"https://api.github.com/repos/kode54/vgmstream/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kode54/vgmstream/pulls/72/commits"},"statuses":{"href":"https://api.github.com/repos/kode54/vgmstream/statuses/0e658031cc23bf96e63f71322124b59a5dbabb78"}}}}
{"actor":{"display_login":"kode54"}}