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
230af767
Commit
230af767
authored
Sep 19, 2009
by
Baptiste Coudurier
Committed by
Rémi Denis-Courmont
Sep 20, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat: remove NOFILE hack, fix MXF seeking
Signed-off-by:
Rémi Denis-Courmont
<
remi@remlab.net
>
parent
579875c0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
12 deletions
+1
-12
modules/demux/avformat/demux.c
modules/demux/avformat/demux.c
+1
-12
No files found.
modules/demux/avformat/demux.c
View file @
230af767
...
@@ -111,7 +111,6 @@ int OpenDemux( vlc_object_t *p_this )
...
@@ -111,7 +111,6 @@ int OpenDemux( vlc_object_t *p_this )
AVProbeData
pd
;
AVProbeData
pd
;
AVInputFormat
*
fmt
;
AVInputFormat
*
fmt
;
unsigned
int
i
;
unsigned
int
i
;
bool
b_avfmt_nofile
;
int64_t
i_start_time
=
-
1
;
int64_t
i_start_time
=
-
1
;
/* Init Probe data */
/* Init Probe data */
...
@@ -194,15 +193,11 @@ int OpenDemux( vlc_object_t *p_this )
...
@@ -194,15 +193,11 @@ int OpenDemux( vlc_object_t *p_this )
init_put_byte
(
&
p_sys
->
io
,
p_sys
->
io_buffer
,
p_sys
->
io_buffer_size
,
init_put_byte
(
&
p_sys
->
io
,
p_sys
->
io_buffer
,
p_sys
->
io_buffer_size
,
0
,
&
p_sys
->
url
,
IORead
,
NULL
,
IOSeek
);
0
,
&
p_sys
->
url
,
IORead
,
NULL
,
IOSeek
);
b_avfmt_nofile
=
p_sys
->
fmt
->
flags
&
AVFMT_NOFILE
;
p_sys
->
fmt
->
flags
|=
AVFMT_NOFILE
;
/* libavformat must not fopen/fclose */
/* Open it */
/* Open it */
if
(
av_open_input_stream
(
&
p_sys
->
ic
,
&
p_sys
->
io
,
p_demux
->
psz_path
,
if
(
av_open_input_stream
(
&
p_sys
->
ic
,
&
p_sys
->
io
,
p_demux
->
psz_path
,
p_sys
->
fmt
,
NULL
)
)
p_sys
->
fmt
,
NULL
)
)
{
{
msg_Err
(
p_demux
,
"av_open_input_stream failed"
);
msg_Err
(
p_demux
,
"av_open_input_stream failed"
);
if
(
!
b_avfmt_nofile
)
p_sys
->
fmt
->
flags
^=
AVFMT_NOFILE
;
CloseDemux
(
p_this
);
CloseDemux
(
p_this
);
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
}
}
...
@@ -212,12 +207,10 @@ int OpenDemux( vlc_object_t *p_this )
...
@@ -212,12 +207,10 @@ int OpenDemux( vlc_object_t *p_this )
{
{
vlc_avcodec_unlock
();
vlc_avcodec_unlock
();
msg_Err
(
p_demux
,
"av_find_stream_info failed"
);
msg_Err
(
p_demux
,
"av_find_stream_info failed"
);
if
(
!
b_avfmt_nofile
)
p_sys
->
fmt
->
flags
^=
AVFMT_NOFILE
;
CloseDemux
(
p_this
);
CloseDemux
(
p_this
);
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
}
}
vlc_avcodec_unlock
();
vlc_avcodec_unlock
();
if
(
!
b_avfmt_nofile
)
p_sys
->
fmt
->
flags
^=
AVFMT_NOFILE
;
for
(
i
=
0
;
i
<
p_sys
->
ic
->
nb_streams
;
i
++
)
for
(
i
=
0
;
i
<
p_sys
->
ic
->
nb_streams
;
i
++
)
{
{
...
@@ -399,14 +392,10 @@ void CloseDemux( vlc_object_t *p_this )
...
@@ -399,14 +392,10 @@ void CloseDemux( vlc_object_t *p_this )
{
{
demux_t
*
p_demux
=
(
demux_t
*
)
p_this
;
demux_t
*
p_demux
=
(
demux_t
*
)
p_this
;
demux_sys_t
*
p_sys
=
p_demux
->
p_sys
;
demux_sys_t
*
p_sys
=
p_demux
->
p_sys
;
bool
b_avfmt_nofile
;
FREENULL
(
p_sys
->
tk
);
FREENULL
(
p_sys
->
tk
);
b_avfmt_nofile
=
p_sys
->
fmt
->
flags
&
AVFMT_NOFILE
;
if
(
p_sys
->
ic
)
av_close_input_stream
(
p_sys
->
ic
);
p_sys
->
fmt
->
flags
|=
AVFMT_NOFILE
;
/* libavformat must not fopen/fclose */
if
(
p_sys
->
ic
)
av_close_input_file
(
p_sys
->
ic
);
if
(
!
b_avfmt_nofile
)
p_sys
->
fmt
->
flags
^=
AVFMT_NOFILE
;
for
(
int
i
=
0
;
i
<
p_sys
->
i_attachments
;
i
++
)
for
(
int
i
=
0
;
i
<
p_sys
->
i_attachments
;
i
++
)
free
(
p_sys
->
attachments
[
i
]
);
free
(
p_sys
->
attachments
[
i
]
);
...
...
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