Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
f746a046
Commit
f746a046
authored
22 years ago
by
Fabrice Bellard
Browse files
Options
Downloads
Patches
Plain Diff
added url_get_filename()
Originally committed as revision 1438 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
0b9fb89d
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
libavformat/avio.c
+7
-1
7 additions, 1 deletion
libavformat/avio.c
libavformat/avio.h
+3
-0
3 additions, 0 deletions
libavformat/avio.h
with
10 additions
and
1 deletion
libavformat/avio.c
+
7
−
1
View file @
f746a046
...
...
@@ -61,11 +61,12 @@ int url_open(URLContext **puc, const char *filename, int flags)
err
=
-
ENOENT
;
goto
fail
;
found:
uc
=
av_malloc
(
sizeof
(
URLContext
));
uc
=
av_malloc
(
sizeof
(
URLContext
)
+
strlen
(
filename
)
);
if
(
!
uc
)
{
err
=
-
ENOMEM
;
goto
fail
;
}
strcpy
(
uc
->
filename
,
filename
);
uc
->
prot
=
up
;
uc
->
flags
=
flags
;
uc
->
is_streamed
=
0
;
/* default = not streamed */
...
...
@@ -154,3 +155,8 @@ int url_get_max_packet_size(URLContext *h)
{
return
h
->
max_packet_size
;
}
void
url_get_filename
(
URLContext
*
h
,
char
*
buf
,
int
buf_size
)
{
pstrcpy
(
buf
,
buf_size
,
h
->
filename
);
}
This diff is collapsed.
Click to expand it.
libavformat/avio.h
+
3
−
0
View file @
f746a046
...
...
@@ -13,6 +13,7 @@ struct URLContext {
int
is_streamed
;
/* true if streamed (no seek possible), default = false */
int
max_packet_size
;
/* if non zero, the stream is packetized with this max packet size */
void
*
priv_data
;
char
filename
[
1
];
/* specified filename */
};
typedef
struct
URLContext
URLContext
;
...
...
@@ -35,6 +36,8 @@ int url_close(URLContext *h);
int
url_exist
(
const
char
*
filename
);
offset_t
url_filesize
(
URLContext
*
h
);
int
url_get_max_packet_size
(
URLContext
*
h
);
void
url_get_filename
(
URLContext
*
h
,
char
*
buf
,
int
buf_size
);
/* not implemented */
int
url_poll
(
URLPollEntry
*
poll_table
,
int
n
,
int
timeout
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment