Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
3a7f7678
Commit
3a7f7678
authored
Dec 11, 2011
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavf: deprecate av_close_input_stream().
And remove all its uses.
parent
59826cab
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
19 additions
and
11 deletions
+19
-11
avserver.c
avserver.c
+2
-2
anm.c
libavformat/anm.c
+5
-6
avformat.h
libavformat/avformat.h
+4
-0
mpegts.c
libavformat/mpegts.c
+1
-1
rtsp.c
libavformat/rtsp.c
+1
-1
utils.c
libavformat/utils.c
+6
-1
No files found.
avserver.c
View file @
3a7f7678
...
...
@@ -2736,7 +2736,7 @@ static int http_receive_data(HTTPContext *c)
/* Now we have the actual streams */
if
(
s
->
nb_streams
!=
feed
->
nb_streams
)
{
av_close_input_
stream
(
s
);
av_close_input_
file
(
s
);
av_free
(
pb
);
http_log
(
"Feed '%s' stream number does not match registered feed
\n
"
,
c
->
stream
->
feed_filename
);
...
...
@@ -2749,7 +2749,7 @@ static int http_receive_data(HTTPContext *c)
avcodec_copy_context
(
fst
->
codec
,
st
->
codec
);
}
av_close_input_
stream
(
s
);
av_close_input_
file
(
s
);
av_free
(
pb
);
}
c
->
buffer_ptr
=
c
->
buffer
;
...
...
libavformat/anm.c
View file @
3a7f7678
...
...
@@ -137,16 +137,16 @@ static int read_header(AVFormatContext *s,
st
->
codec
->
extradata
=
av_mallocz
(
st
->
codec
->
extradata_size
+
FF_INPUT_BUFFER_PADDING_SIZE
);
if
(
!
st
->
codec
->
extradata
)
{
ret
=
AVERROR
(
ENOMEM
);
goto
close_and_return
;
goto
fail
;
}
ret
=
avio_read
(
pb
,
st
->
codec
->
extradata
,
st
->
codec
->
extradata_size
);
if
(
ret
<
0
)
goto
close_and_return
;
goto
fail
;
/* read page table */
ret
=
avio_seek
(
pb
,
anm
->
page_table_offset
,
SEEK_SET
);
if
(
ret
<
0
)
goto
close_and_return
;
goto
fail
;
for
(
i
=
0
;
i
<
MAX_PAGES
;
i
++
)
{
Page
*
p
=
&
anm
->
pt
[
i
];
...
...
@@ -159,7 +159,7 @@ static int read_header(AVFormatContext *s,
anm
->
page
=
find_record
(
anm
,
0
);
if
(
anm
->
page
<
0
)
{
ret
=
anm
->
page
;
goto
close_and_return
;
goto
fail
;
}
anm
->
record
=
-
1
;
...
...
@@ -169,8 +169,7 @@ invalid:
av_log_ask_for_sample
(
s
,
NULL
);
ret
=
AVERROR_INVALIDDATA
;
close_and_return:
av_close_input_stream
(
s
);
fail:
return
ret
;
}
...
...
libavformat/avformat.h
View file @
3a7f7678
...
...
@@ -1560,11 +1560,15 @@ int av_read_play(AVFormatContext *s);
*/
int
av_read_pause
(
AVFormatContext
*
s
);
#if FF_API_FORMAT_PARAMETERS
/**
* Free a AVFormatContext allocated by av_open_input_stream.
* @param s context to free
* @deprecated use av_close_input_file()
*/
attribute_deprecated
void
av_close_input_stream
(
AVFormatContext
*
s
);
#endif
/**
* Close a media file (but not its codecs).
...
...
libavformat/mpegts.c
View file @
3a7f7678
...
...
@@ -368,7 +368,7 @@ static void mpegts_close_filter(MpegTSContext *ts, MpegTSFilter *filter)
PESContext
*
pes
=
filter
->
u
.
pes_filter
.
opaque
;
av_freep
(
&
pes
->
buffer
);
/* referenced private data will be freed later in
* av_close_input_
stream
*/
* av_close_input_
file
*/
if
(
!
((
PESContext
*
)
filter
->
u
.
pes_filter
.
opaque
)
->
st
)
{
av_freep
(
&
filter
->
u
.
pes_filter
.
opaque
);
}
...
...
libavformat/rtsp.c
View file @
3a7f7678
...
...
@@ -580,7 +580,7 @@ void ff_rtsp_close_streams(AVFormatContext *s)
}
av_free
(
rt
->
rtsp_streams
);
if
(
rt
->
asf_ctx
)
{
av_close_input_
stream
(
rt
->
asf_ctx
);
av_close_input_
file
(
rt
->
asf_ctx
);
rt
->
asf_ctx
=
NULL
;
}
av_free
(
rt
->
p
);
...
...
libavformat/utils.c
View file @
3a7f7678
...
...
@@ -2632,6 +2632,7 @@ int av_read_pause(AVFormatContext *s)
return
AVERROR
(
ENOSYS
);
}
#if FF_API_FORMAT_PARAMETERS
void
av_close_input_stream
(
AVFormatContext
*
s
)
{
flush_packet_queue
(
s
);
...
...
@@ -2639,6 +2640,7 @@ void av_close_input_stream(AVFormatContext *s)
s
->
iformat
->
read_close
(
s
);
avformat_free_context
(
s
);
}
#endif
void
avformat_free_context
(
AVFormatContext
*
s
)
{
...
...
@@ -2686,7 +2688,10 @@ void av_close_input_file(AVFormatContext *s)
{
AVIOContext
*
pb
=
(
s
->
iformat
->
flags
&
AVFMT_NOFILE
)
||
(
s
->
flags
&
AVFMT_FLAG_CUSTOM_IO
)
?
NULL
:
s
->
pb
;
av_close_input_stream
(
s
);
flush_packet_queue
(
s
);
if
(
s
->
iformat
->
read_close
)
s
->
iformat
->
read_close
(
s
);
avformat_free_context
(
s
);
if
(
pb
)
avio_close
(
pb
);
}
...
...
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