Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
110d75c3
Commit
110d75c3
authored
Feb 09, 2012
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ts mux: simplify compare functions
parent
8ea322d7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
13 deletions
+6
-13
modules/mux/mpeg/ts.c
modules/mux/mpeg/ts.c
+6
-13
No files found.
modules/mux/mpeg/ts.c
View file @
110d75c3
...
@@ -444,22 +444,15 @@ static int AllocatePID( sout_mux_sys_t *p_sys, int i_cat )
...
@@ -444,22 +444,15 @@ static int AllocatePID( sout_mux_sys_t *p_sys, int i_cat )
static
int
pmtcompare
(
const
void
*
pa
,
const
void
*
pb
)
static
int
pmtcompare
(
const
void
*
pa
,
const
void
*
pb
)
{
{
if
(
((
pmt_map_t
*
)
pa
)
->
i_pid
<
((
pmt_map_t
*
)
pb
)
->
i_pid
)
int
id1
=
((
pmt_map_t
*
)
pa
)
->
i_pid
;
return
-
1
;
int
id2
=
((
pmt_map_t
*
)
pb
)
->
i_pid
;
else
if
(
((
pmt_map_t
*
)
pa
)
->
i_pid
>
((
pmt_map_t
*
)
pb
)
->
i_pid
)
return
1
;
return
id1
-
id2
;
else
return
0
;
}
}
static
int
intcompare
(
const
void
*
pa
,
const
void
*
pb
)
static
int
intcompare
(
const
void
*
pa
,
const
void
*
pb
)
{
{
if
(
*
(
int
*
)
pa
<
*
(
int
*
)
pb
)
return
*
(
int
*
)
pa
-
*
(
int
*
)
pb
;
return
-
1
;
else
if
(
*
(
int
*
)
pa
>
*
(
int
*
)
pb
)
return
1
;
else
return
0
;
}
}
/*****************************************************************************
/*****************************************************************************
...
@@ -566,7 +559,7 @@ static int Open( vlc_object_t *p_this )
...
@@ -566,7 +559,7 @@ static int Open( vlc_object_t *p_this )
/* Now sort according to pids for fast search later on */
/* Now sort according to pids for fast search later on */
qsort
(
(
void
*
)
p_sys
->
pmtmap
,
p_sys
->
i_pmtslots
,
qsort
(
(
void
*
)
p_sys
->
pmtmap
,
p_sys
->
i_pmtslots
,
sizeof
(
pmt_map_t
),
&
pmtcompare
);
sizeof
(
pmt_map_t
),
pmtcompare
);
if
(
!*
psz_next
)
if
(
!*
psz_next
)
psz
=
NULL
;
psz
=
NULL
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment