diff options
author | Aleksoid <aleksoid@users.sourceforge.net> | 2011-12-29 12:53:11 +0400 |
---|---|---|
committer | Aleksoid <aleksoid@users.sourceforge.net> | 2011-12-29 12:53:11 +0400 |
commit | 6b0bbfa8b210edda57dc871664e1c10119ab6755 (patch) | |
tree | be4588e0af738750105c48a7abed71b9b24d2342 /src | |
parent | 83e3363402ed5eef752b8a48ebc84dad57589fb4 (diff) |
Change : MPEGSplitter - sorting tracks in Ascending order;
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@3925 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src')
-rw-r--r-- | src/filters/parser/MpegSplitter/MpegSplitterFile.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/filters/parser/MpegSplitter/MpegSplitterFile.h b/src/filters/parser/MpegSplitter/MpegSplitterFile.h index 085591c10..566a6b8e4 100644 --- a/src/filters/parser/MpegSplitter/MpegSplitterFile.h +++ b/src/filters/parser/MpegSplitter/MpegSplitterFile.h @@ -97,8 +97,19 @@ public: return;
}
}
+ AddTail(s);
+ } else {
+ AddTail(s);
+ if(GetCount() > 1) {
+ for (size_t j=0; j<GetCount(); j++) {
+ for(size_t i=0; i<GetCount()-1; i++) {
+ if (GetAt(FindIndex(i)) > GetAt(FindIndex(i+1))) {
+ SwapElements(FindIndex(i), FindIndex(i+1));
+ }
+ }
+ }
+ }
}
- AddTail(s);
}
void Replace(stream& source, stream& dest, CMpegSplitterFile *_pFile) {
|