Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
cd3716b9
Commit
cd3716b9
authored
Dec 11, 2011
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace all uses of av_close_input_file() with avformat_close_input().
parent
52660454
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
22 additions
and
26 deletions
+22
-26
avconv.c
avconv.c
+2
-2
avplay.c
avplay.c
+1
-2
avprobe.c
avprobe.c
+1
-1
avserver.c
avserver.c
+8
-9
vsrc_movie.c
libavfilter/vsrc_movie.c
+1
-1
applehttp.c
libavformat/applehttp.c
+1
-1
avidec.c
libavformat/avidec.c
+1
-1
mpegts.c
libavformat/mpegts.c
+1
-1
rdt.c
libavformat/rdt.c
+1
-1
rtpdec_asf.c
libavformat/rtpdec_asf.c
+1
-2
rtsp.c
libavformat/rtsp.c
+1
-2
sapdec.c
libavformat/sapdec.c
+1
-1
seek-test.c
libavformat/seek-test.c
+1
-1
pktdumper.c
tools/pktdumper.c
+1
-1
No files found.
avconv.c
View file @
cd3716b9
...
@@ -523,7 +523,7 @@ void exit_program(int ret)
...
@@ -523,7 +523,7 @@ void exit_program(int ret)
av_dict_free
(
&
output_files
[
i
].
opts
);
av_dict_free
(
&
output_files
[
i
].
opts
);
}
}
for
(
i
=
0
;
i
<
nb_input_files
;
i
++
)
{
for
(
i
=
0
;
i
<
nb_input_files
;
i
++
)
{
av
_close_input_file
(
input_files
[
i
].
ctx
);
av
format_close_input
(
&
input_files
[
i
].
ctx
);
}
}
for
(
i
=
0
;
i
<
nb_input_streams
;
i
++
)
{
for
(
i
=
0
;
i
<
nb_input_streams
;
i
++
)
{
av_freep
(
&
input_streams
[
i
].
decoded_frame
);
av_freep
(
&
input_streams
[
i
].
decoded_frame
);
...
@@ -3023,7 +3023,7 @@ static int opt_input_file(OptionsContext *o, const char *opt, const char *filena
...
@@ -3023,7 +3023,7 @@ static int opt_input_file(OptionsContext *o, const char *opt, const char *filena
ret
=
avformat_find_stream_info
(
ic
,
opts
);
ret
=
avformat_find_stream_info
(
ic
,
opts
);
if
(
ret
<
0
)
{
if
(
ret
<
0
)
{
av_log
(
NULL
,
AV_LOG_FATAL
,
"%s: could not find codec parameters
\n
"
,
filename
);
av_log
(
NULL
,
AV_LOG_FATAL
,
"%s: could not find codec parameters
\n
"
,
filename
);
av
_close_input_file
(
ic
);
av
format_close_input
(
&
ic
);
exit_program
(
1
);
exit_program
(
1
);
}
}
...
...
avplay.c
View file @
cd3716b9
...
@@ -2593,8 +2593,7 @@ static int decode_thread(void *arg)
...
@@ -2593,8 +2593,7 @@ static int decode_thread(void *arg)
if
(
is
->
subtitle_stream
>=
0
)
if
(
is
->
subtitle_stream
>=
0
)
stream_component_close
(
is
,
is
->
subtitle_stream
);
stream_component_close
(
is
,
is
->
subtitle_stream
);
if
(
is
->
ic
)
{
if
(
is
->
ic
)
{
av_close_input_file
(
is
->
ic
);
avformat_close_input
(
&
is
->
ic
);
is
->
ic
=
NULL
;
/* safety */
}
}
avio_set_interrupt_cb
(
NULL
);
avio_set_interrupt_cb
(
NULL
);
...
...
avprobe.c
View file @
cd3716b9
...
@@ -325,7 +325,7 @@ static int probe_file(const char *filename)
...
@@ -325,7 +325,7 @@ static int probe_file(const char *filename)
if
(
do_show_format
)
if
(
do_show_format
)
show_format
(
fmt_ctx
);
show_format
(
fmt_ctx
);
av
_close_input_file
(
fmt_ctx
);
av
format_close_input
(
&
fmt_ctx
);
return
0
;
return
0
;
}
}
...
...
avserver.c
View file @
cd3716b9
...
@@ -849,7 +849,7 @@ static void close_connection(HTTPContext *c)
...
@@ -849,7 +849,7 @@ static void close_connection(HTTPContext *c)
if
(
st
->
codec
->
codec
)
if
(
st
->
codec
->
codec
)
avcodec_close
(
st
->
codec
);
avcodec_close
(
st
->
codec
);
}
}
av
_close_input_file
(
c
->
fmt_in
);
av
format_close_input
(
&
c
->
fmt_in
);
}
}
/* free RTP output streams if any */
/* free RTP output streams if any */
...
@@ -2169,7 +2169,7 @@ static int open_input_stream(HTTPContext *c, const char *info)
...
@@ -2169,7 +2169,7 @@ static int open_input_stream(HTTPContext *c, const char *info)
c
->
fmt_in
=
s
;
c
->
fmt_in
=
s
;
if
(
strcmp
(
s
->
iformat
->
name
,
"ffm"
)
&&
avformat_find_stream_info
(
c
->
fmt_in
,
NULL
)
<
0
)
{
if
(
strcmp
(
s
->
iformat
->
name
,
"ffm"
)
&&
avformat_find_stream_info
(
c
->
fmt_in
,
NULL
)
<
0
)
{
http_log
(
"Could not find stream info '%s'
\n
"
,
input_filename
);
http_log
(
"Could not find stream info '%s'
\n
"
,
input_filename
);
av
_close_input_file
(
s
);
av
format_close_input
(
&
s
);
return
-
1
;
return
-
1
;
}
}
...
@@ -2311,8 +2311,7 @@ static int http_prepare_data(HTTPContext *c)
...
@@ -2311,8 +2311,7 @@ static int http_prepare_data(HTTPContext *c)
return
0
;
return
0
;
}
else
{
}
else
{
if
(
c
->
stream
->
loop
)
{
if
(
c
->
stream
->
loop
)
{
av_close_input_file
(
c
->
fmt_in
);
avformat_close_input
(
&
c
->
fmt_in
);
c
->
fmt_in
=
NULL
;
if
(
open_input_stream
(
c
,
""
)
<
0
)
if
(
open_input_stream
(
c
,
""
)
<
0
)
goto
no_loop
;
goto
no_loop
;
goto
redo
;
goto
redo
;
...
@@ -2736,7 +2735,7 @@ static int http_receive_data(HTTPContext *c)
...
@@ -2736,7 +2735,7 @@ static int http_receive_data(HTTPContext *c)
/* Now we have the actual streams */
/* Now we have the actual streams */
if
(
s
->
nb_streams
!=
feed
->
nb_streams
)
{
if
(
s
->
nb_streams
!=
feed
->
nb_streams
)
{
av
_close_input_file
(
s
);
av
format_close_input
(
&
s
);
av_free
(
pb
);
av_free
(
pb
);
http_log
(
"Feed '%s' stream number does not match registered feed
\n
"
,
http_log
(
"Feed '%s' stream number does not match registered feed
\n
"
,
c
->
stream
->
feed_filename
);
c
->
stream
->
feed_filename
);
...
@@ -2749,7 +2748,7 @@ static int http_receive_data(HTTPContext *c)
...
@@ -2749,7 +2748,7 @@ static int http_receive_data(HTTPContext *c)
avcodec_copy_context
(
fst
->
codec
,
st
->
codec
);
avcodec_copy_context
(
fst
->
codec
,
st
->
codec
);
}
}
av
_close_input_file
(
s
);
av
format_close_input
(
&
s
);
av_free
(
pb
);
av_free
(
pb
);
}
}
c
->
buffer_ptr
=
c
->
buffer
;
c
->
buffer_ptr
=
c
->
buffer
;
...
@@ -3629,7 +3628,7 @@ static void build_file_streams(void)
...
@@ -3629,7 +3628,7 @@ static void build_file_streams(void)
if
(
avformat_find_stream_info
(
infile
,
NULL
)
<
0
)
{
if
(
avformat_find_stream_info
(
infile
,
NULL
)
<
0
)
{
http_log
(
"Could not find codec parameters from '%s'
\n
"
,
http_log
(
"Could not find codec parameters from '%s'
\n
"
,
stream
->
feed_filename
);
stream
->
feed_filename
);
av
_close_input_file
(
infile
);
av
format_close_input
(
&
infile
);
goto
fail
;
goto
fail
;
}
}
extract_mpeg4_header
(
infile
);
extract_mpeg4_header
(
infile
);
...
@@ -3637,7 +3636,7 @@ static void build_file_streams(void)
...
@@ -3637,7 +3636,7 @@ static void build_file_streams(void)
for
(
i
=
0
;
i
<
infile
->
nb_streams
;
i
++
)
for
(
i
=
0
;
i
<
infile
->
nb_streams
;
i
++
)
add_av_stream1
(
stream
,
infile
->
streams
[
i
]
->
codec
,
1
);
add_av_stream1
(
stream
,
infile
->
streams
[
i
]
->
codec
,
1
);
av
_close_input_file
(
infile
);
av
format_close_input
(
&
infile
);
}
}
}
}
}
}
...
@@ -3727,7 +3726,7 @@ static void build_feed_streams(void)
...
@@ -3727,7 +3726,7 @@ static void build_feed_streams(void)
http_log
(
"Deleting feed file '%s' as stream counts differ (%d != %d)
\n
"
,
http_log
(
"Deleting feed file '%s' as stream counts differ (%d != %d)
\n
"
,
feed
->
feed_filename
,
s
->
nb_streams
,
feed
->
nb_streams
);
feed
->
feed_filename
,
s
->
nb_streams
,
feed
->
nb_streams
);
av
_close_input_file
(
s
);
av
format_close_input
(
&
s
);
}
else
}
else
http_log
(
"Deleting feed file '%s' as it appears to be corrupt
\n
"
,
http_log
(
"Deleting feed file '%s' as it appears to be corrupt
\n
"
,
feed
->
feed_filename
);
feed
->
feed_filename
);
...
...
libavfilter/vsrc_movie.c
View file @
cd3716b9
...
@@ -192,7 +192,7 @@ static av_cold void uninit(AVFilterContext *ctx)
...
@@ -192,7 +192,7 @@ static av_cold void uninit(AVFilterContext *ctx)
if
(
movie
->
codec_ctx
)
if
(
movie
->
codec_ctx
)
avcodec_close
(
movie
->
codec_ctx
);
avcodec_close
(
movie
->
codec_ctx
);
if
(
movie
->
format_ctx
)
if
(
movie
->
format_ctx
)
av
_close_input_file
(
movie
->
format_ctx
);
av
format_close_input
(
&
movie
->
format_ctx
);
avfilter_unref_buffer
(
movie
->
picref
);
avfilter_unref_buffer
(
movie
->
picref
);
av_freep
(
&
movie
->
frame
);
av_freep
(
&
movie
->
frame
);
}
}
...
...
libavformat/applehttp.c
View file @
cd3716b9
...
@@ -132,7 +132,7 @@ static void free_variant_list(AppleHTTPContext *c)
...
@@ -132,7 +132,7 @@ static void free_variant_list(AppleHTTPContext *c)
ffurl_close
(
var
->
input
);
ffurl_close
(
var
->
input
);
if
(
var
->
ctx
)
{
if
(
var
->
ctx
)
{
var
->
ctx
->
pb
=
NULL
;
var
->
ctx
->
pb
=
NULL
;
av
_close_input_file
(
var
->
ctx
);
av
format_close_input
(
&
var
->
ctx
);
}
}
av_free
(
var
);
av_free
(
var
);
}
}
...
...
libavformat/avidec.c
View file @
cd3716b9
...
@@ -1365,7 +1365,7 @@ static int avi_read_close(AVFormatContext *s)
...
@@ -1365,7 +1365,7 @@ static int avi_read_close(AVFormatContext *s)
if
(
ast
)
{
if
(
ast
)
{
if
(
ast
->
sub_ctx
)
{
if
(
ast
->
sub_ctx
)
{
av_freep
(
&
ast
->
sub_ctx
->
pb
);
av_freep
(
&
ast
->
sub_ctx
->
pb
);
av
_close_input_file
(
ast
->
sub_ctx
);
av
format_close_input
(
&
ast
->
sub_ctx
);
}
}
av_free
(
ast
->
sub_buffer
);
av_free
(
ast
->
sub_buffer
);
av_free_packet
(
&
ast
->
sub_pkt
);
av_free_packet
(
&
ast
->
sub_pkt
);
...
...
libavformat/mpegts.c
View file @
cd3716b9
...
@@ -368,7 +368,7 @@ static void mpegts_close_filter(MpegTSContext *ts, MpegTSFilter *filter)
...
@@ -368,7 +368,7 @@ static void mpegts_close_filter(MpegTSContext *ts, MpegTSFilter *filter)
PESContext
*
pes
=
filter
->
u
.
pes_filter
.
opaque
;
PESContext
*
pes
=
filter
->
u
.
pes_filter
.
opaque
;
av_freep
(
&
pes
->
buffer
);
av_freep
(
&
pes
->
buffer
);
/* referenced private data will be freed later in
/* referenced private data will be freed later in
* av
_close_input_file
*/
* av
format_close_input
*/
if
(
!
((
PESContext
*
)
filter
->
u
.
pes_filter
.
opaque
)
->
st
)
{
if
(
!
((
PESContext
*
)
filter
->
u
.
pes_filter
.
opaque
)
->
st
)
{
av_freep
(
&
filter
->
u
.
pes_filter
.
opaque
);
av_freep
(
&
filter
->
u
.
pes_filter
.
opaque
);
}
}
...
...
libavformat/rdt.c
View file @
cd3716b9
...
@@ -544,7 +544,7 @@ rdt_free_context (PayloadContext *rdt)
...
@@ -544,7 +544,7 @@ rdt_free_context (PayloadContext *rdt)
av_freep
(
&
rdt
->
rmst
[
i
]);
av_freep
(
&
rdt
->
rmst
[
i
]);
}
}
if
(
rdt
->
rmctx
)
if
(
rdt
->
rmctx
)
av
_close_input_file
(
rdt
->
rmctx
);
av
format_close_input
(
&
rdt
->
rmctx
);
av_freep
(
&
rdt
->
mlti_data
);
av_freep
(
&
rdt
->
mlti_data
);
av_freep
(
&
rdt
->
rmst
);
av_freep
(
&
rdt
->
rmst
);
av_free
(
rdt
);
av_free
(
rdt
);
...
...
libavformat/rtpdec_asf.c
View file @
cd3716b9
...
@@ -108,8 +108,7 @@ int ff_wms_parse_sdp_a_line(AVFormatContext *s, const char *p)
...
@@ -108,8 +108,7 @@ int ff_wms_parse_sdp_a_line(AVFormatContext *s, const char *p)
"Failed to fix invalid RTSP-MS/ASF min_pktsize
\n
"
);
"Failed to fix invalid RTSP-MS/ASF min_pktsize
\n
"
);
init_packetizer
(
&
pb
,
buf
,
len
);
init_packetizer
(
&
pb
,
buf
,
len
);
if
(
rt
->
asf_ctx
)
{
if
(
rt
->
asf_ctx
)
{
av_close_input_file
(
rt
->
asf_ctx
);
avformat_close_input
(
&
rt
->
asf_ctx
);
rt
->
asf_ctx
=
NULL
;
}
}
if
(
!
(
rt
->
asf_ctx
=
avformat_alloc_context
()))
if
(
!
(
rt
->
asf_ctx
=
avformat_alloc_context
()))
return
AVERROR
(
ENOMEM
);
return
AVERROR
(
ENOMEM
);
...
...
libavformat/rtsp.c
View file @
cd3716b9
...
@@ -580,8 +580,7 @@ void ff_rtsp_close_streams(AVFormatContext *s)
...
@@ -580,8 +580,7 @@ void ff_rtsp_close_streams(AVFormatContext *s)
}
}
av_free
(
rt
->
rtsp_streams
);
av_free
(
rt
->
rtsp_streams
);
if
(
rt
->
asf_ctx
)
{
if
(
rt
->
asf_ctx
)
{
av_close_input_file
(
rt
->
asf_ctx
);
avformat_close_input
(
&
rt
->
asf_ctx
);
rt
->
asf_ctx
=
NULL
;
}
}
av_free
(
rt
->
p
);
av_free
(
rt
->
p
);
av_free
(
rt
->
recvbuf
);
av_free
(
rt
->
recvbuf
);
...
...
libavformat/sapdec.c
View file @
cd3716b9
...
@@ -52,7 +52,7 @@ static int sap_read_close(AVFormatContext *s)
...
@@ -52,7 +52,7 @@ static int sap_read_close(AVFormatContext *s)
{
{
struct
SAPState
*
sap
=
s
->
priv_data
;
struct
SAPState
*
sap
=
s
->
priv_data
;
if
(
sap
->
sdp_ctx
)
if
(
sap
->
sdp_ctx
)
av
_close_input_file
(
sap
->
sdp_ctx
);
av
format_close_input
(
&
sap
->
sdp_ctx
);
if
(
sap
->
ann_fd
)
if
(
sap
->
ann_fd
)
ffurl_close
(
sap
->
ann_fd
);
ffurl_close
(
sap
->
ann_fd
);
av_freep
(
&
sap
->
sdp
);
av_freep
(
&
sap
->
sdp
);
...
...
libavformat/seek-test.c
View file @
cd3716b9
...
@@ -127,7 +127,7 @@ int main(int argc, char **argv)
...
@@ -127,7 +127,7 @@ int main(int argc, char **argv)
printf
(
"ret:%-10s st:%2d flags:%d ts:%s
\n
"
,
ret_str
(
ret
),
stream_id
,
i
&
1
,
ts_buf
);
printf
(
"ret:%-10s st:%2d flags:%d ts:%s
\n
"
,
ret_str
(
ret
),
stream_id
,
i
&
1
,
ts_buf
);
}
}
av
_close_input_file
(
ic
);
av
format_close_input
(
&
ic
);
return
0
;
return
0
;
}
}
tools/pktdumper.c
View file @
cd3716b9
...
@@ -117,7 +117,7 @@ int main(int argc, char **argv)
...
@@ -117,7 +117,7 @@ int main(int argc, char **argv)
break
;
break
;
}
}
av
_close_input_file
(
fctx
);
av
format_close_input
(
&
fctx
);
while
(
donotquit
)
while
(
donotquit
)
sleep
(
60
);
sleep
(
60
);
...
...
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