Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
30cc7cca
Commit
30cc7cca
authored
Apr 29, 2006
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't use #ifdef + alloca() when we have something simpler
parent
fdf4ef95
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
14 deletions
+4
-14
modules/demux/mp4/mp4.c
modules/demux/mp4/mp4.c
+4
-14
No files found.
modules/demux/mp4/mp4.c
View file @
30cc7cca
...
...
@@ -408,24 +408,17 @@ static int Open( vlc_object_t * p_this )
/* msg dbg relative ? */
int
i_path_size
=
strlen
(
p_demux
->
psz_access
)
+
3
+
strlen
(
p_demux
->
psz_path
)
+
strlen
(
psz_ref
)
+
1
;
#ifdef HAVE_ALLOCA
char
*
psz_absolute
=
alloca
(
i_path_size
);
#else
char
*
psz_absolute
=
(
char
*
)
malloc
(
i_path_size
);
#endif
char
psz_absolute
[
i_path_size
];
char
*
end
=
strrchr
(
p_demux
->
psz_path
,
'/'
);
if
(
end
)
{
int
i_len
=
end
+
1
-
p_demux
->
psz_path
;
strcpy
(
psz_absolute
,
p_demux
->
psz_access
);
strcat
(
psz_absolute
,
"://"
);
strncat
(
psz_absolute
,
p_demux
->
psz_path
,
i_len
);
snprintf
(
psz_absolute
,
i_path_size
,
"%s://%s"
,
p_demux
->
psz_access
,
p_demux
->
psz_path
);
}
else
{
strcpy
(
psz_absolute
,
""
)
;
*
psz_absolute
=
'\0'
;
}
strcat
(
psz_absolute
,
psz_ref
);
msg_Dbg
(
p_demux
,
"adding ref = `%s'"
,
psz_absolute
);
...
...
@@ -445,9 +438,6 @@ static int Open( vlc_object_t * p_this )
b_play
=
VLC_TRUE
;
}
}
#ifndef HAVE_ALLOCA
free
(
psz_absolute
);
#endif
}
}
else
...
...
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