Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Releases
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stefan Westerfeld
ffmpeg
Commits
6f554521
Commit
6f554521
authored
Jan 13, 2017
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use the new AVIOContext destructor.
parent
99684f3a
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
21 additions
and
19 deletions
+21
-19
avprobe.c
avprobe.c
+1
-1
avidec.c
libavformat/avidec.c
+2
-2
flac_picture.c
libavformat/flac_picture.c
+2
-2
hdsenc.c
libavformat/hdsenc.c
+2
-2
mpjpegdec.c
libavformat/mpjpegdec.c
+1
-1
rdt.c
libavformat/rdt.c
+1
-1
segment.c
libavformat/segment.c
+5
-5
smoothstreamingenc.c
libavformat/smoothstreamingenc.c
+2
-2
swfdec.c
libavformat/swfdec.c
+3
-1
movenc.c
libavformat/tests/movenc.c
+1
-1
wtv.c
libavformat/wtv.c
+1
-1
No files found.
avprobe.c
View file @
6f554521
...
...
@@ -1178,7 +1178,7 @@ int main(int argc, char **argv)
ret
=
probe_file
(
input_filename
);
probe_footer
();
avio_flush
(
probe_out
);
av
_freep
(
&
probe_out
);
av
io_context_free
(
&
probe_out
);
av_freep
(
&
buffer
);
uninit_opts
();
avformat_network_deinit
();
...
...
libavformat/avidec.c
View file @
6f554521
...
...
@@ -901,7 +901,7 @@ static int read_gab2_sub(AVStream *st, AVPacket *pkt)
return
1
;
error:
av
_freep
(
&
pb
);
av
io_context_free
(
&
pb
);
}
return
0
;
}
...
...
@@ -1576,7 +1576,7 @@ static int avi_read_close(AVFormatContext *s)
AVIStream
*
ast
=
st
->
priv_data
;
if
(
ast
)
{
if
(
ast
->
sub_ctx
)
{
av
_freep
(
&
ast
->
sub_ctx
->
pb
);
av
io_context_free
(
&
ast
->
sub_ctx
->
pb
);
avformat_close_input
(
&
ast
->
sub_ctx
);
}
av_free
(
ast
->
sub_buffer
);
...
...
libavformat/flac_picture.c
View file @
6f554521
...
...
@@ -139,14 +139,14 @@ int ff_flac_parse_picture(AVFormatContext *s, uint8_t *buf, int buf_size)
if
(
desc
)
av_dict_set
(
&
st
->
metadata
,
"title"
,
desc
,
AV_DICT_DONT_STRDUP_VAL
);
av
_freep
(
&
pb
);
av
io_context_free
(
&
pb
);
return
0
;
fail:
av_buffer_unref
(
&
data
);
av_freep
(
&
desc
);
av
_freep
(
&
pb
);
av
io_context_free
(
&
pb
);
return
ret
;
}
libavformat/hdsenc.c
View file @
6f554521
...
...
@@ -143,8 +143,8 @@ static void hds_free(AVFormatContext *s)
ff_format_io_close
(
s
,
&
os
->
out
);
if
(
os
->
ctx
&&
os
->
ctx_inited
)
av_write_trailer
(
os
->
ctx
);
if
(
os
->
ctx
&&
os
->
ctx
->
pb
)
av
_free
(
os
->
ctx
->
pb
);
if
(
os
->
ctx
)
av
io_context_free
(
&
os
->
ctx
->
pb
);
if
(
os
->
ctx
)
avformat_free_context
(
os
->
ctx
);
av_free
(
os
->
metadata
);
...
...
libavformat/mpjpegdec.c
View file @
6f554521
...
...
@@ -102,7 +102,7 @@ static int mpjpeg_read_probe(AVProbeData *p)
}
}
av
_free
(
pb
);
av
io_context_free
(
&
pb
);
return
ret
;
}
...
...
libavformat/rdt.c
View file @
6f554521
...
...
@@ -324,7 +324,7 @@ get_cache:
st
,
rdt
->
rmst
[
st
->
index
],
pkt
);
if
(
rdt
->
audio_pkt_cnt
==
0
&&
st
->
codecpar
->
codec_id
==
AV_CODEC_ID_AAC
)
av
_freep
(
&
rdt
->
rmctx
->
pb
);
av
io_context_free
(
&
rdt
->
rmctx
->
pb
);
}
pkt
->
stream_index
=
st
->
index
;
pkt
->
pts
=
*
timestamp
;
...
...
libavformat/segment.c
View file @
6f554521
...
...
@@ -184,10 +184,10 @@ static int open_null_ctx(AVIOContext **ctx)
return
0
;
}
static
void
close_null_ctx
(
AVIOContext
*
pb
)
static
void
close_null_ctx
(
AVIOContext
*
*
pb
)
{
av_free
(
pb
->
buffer
);
av_free
(
pb
);
av_free
(
(
*
pb
)
->
buffer
);
av
io_context
_free
(
pb
);
}
static
void
seg_free_context
(
SegmentContext
*
seg
)
...
...
@@ -259,7 +259,7 @@ static int seg_write_header(AVFormatContext *s)
}
if
(
!
seg
->
write_header_trailer
)
{
close_null_ctx
(
oc
->
pb
);
close_null_ctx
(
&
oc
->
pb
);
if
((
ret
=
s
->
io_open
(
s
,
&
oc
->
pb
,
oc
->
filename
,
AVIO_FLAG_WRITE
,
NULL
))
<
0
)
goto
fail
;
}
...
...
@@ -353,7 +353,7 @@ static int seg_write_trailer(struct AVFormatContext *s)
if
((
ret
=
open_null_ctx
(
&
oc
->
pb
))
<
0
)
goto
fail
;
ret
=
av_write_trailer
(
oc
);
close_null_ctx
(
oc
->
pb
);
close_null_ctx
(
&
oc
->
pb
);
}
else
{
ret
=
segment_end
(
oc
,
1
);
}
...
...
libavformat/smoothstreamingenc.c
View file @
6f554521
...
...
@@ -187,8 +187,8 @@ static void ism_free(AVFormatContext *s)
os
->
out
=
os
->
out2
=
os
->
tail_out
=
NULL
;
if
(
os
->
ctx
&&
os
->
ctx_inited
)
av_write_trailer
(
os
->
ctx
);
if
(
os
->
ctx
&&
os
->
ctx
->
pb
)
av
_free
(
os
->
ctx
->
pb
);
if
(
os
->
ctx
)
av
io_context_free
(
&
os
->
ctx
->
pb
);
if
(
os
->
ctx
)
avformat_free_context
(
os
->
ctx
);
av_free
(
os
->
private_str
);
...
...
libavformat/swfdec.c
View file @
6f554521
...
...
@@ -310,7 +310,9 @@ static av_cold int swf_read_close(AVFormatContext *avctx)
inflateEnd
(
&
s
->
zstream
);
av_freep
(
&
s
->
zbuf_in
);
av_freep
(
&
s
->
zbuf_out
);
av_freep
(
&
s
->
zpb
);
avio_context_free
(
&
s
->
zpb
);
return
0
;
}
#endif
...
...
libavformat/tests/movenc.c
View file @
6f554521
...
...
@@ -338,7 +338,7 @@ static void signal_init_ts(void)
static
void
finish
(
void
)
{
av_write_trailer
(
ctx
);
av
_free
(
ctx
->
pb
);
av
io_context_free
(
&
ctx
->
pb
);
avformat_free_context
(
ctx
);
ctx
=
NULL
;
}
...
...
libavformat/wtv.c
View file @
6f554521
...
...
@@ -313,7 +313,7 @@ static void wtvfile_close(AVIOContext *pb)
av_free
(
wf
->
sectors
);
av_free
(
wf
);
av_free
(
pb
->
buffer
);
av
_free
(
pb
);
av
io_context_free
(
&
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