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
0ea58059
Commit
0ea58059
authored
Jun 20, 2016
by
Matthieu Bouron
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavc/h264_ps: add ff_h264_ps_uninit and use it
parent
acfab2dc
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
16 deletions
+25
-16
h264.c
libavcodec/h264.c
+1
-9
h264.h
libavcodec/h264.h
+6
-0
h264_parser.c
libavcodec/h264_parser.c
+1
-7
h264_ps.c
libavcodec/h264_ps.c
+17
-0
No files found.
libavcodec/h264.c
View file @
0ea58059
...
...
@@ -377,15 +377,7 @@ static av_cold int h264_decode_end(AVCodecContext *avctx)
h
->
nb_slice_ctx
=
0
;
ff_h264_sei_uninit
(
&
h
->
sei
);
for
(
i
=
0
;
i
<
MAX_SPS_COUNT
;
i
++
)
av_buffer_unref
(
&
h
->
ps
.
sps_list
[
i
]);
for
(
i
=
0
;
i
<
MAX_PPS_COUNT
;
i
++
)
av_buffer_unref
(
&
h
->
ps
.
pps_list
[
i
]);
av_buffer_unref
(
&
h
->
ps
.
sps_ref
);
av_buffer_unref
(
&
h
->
ps
.
pps_ref
);
ff_h264_ps_uninit
(
&
h
->
ps
);
ff_h2645_packet_uninit
(
&
h
->
pkt
);
...
...
libavcodec/h264.h
View file @
0ea58059
...
...
@@ -694,6 +694,12 @@ typedef struct H264Context {
extern
const
uint16_t
ff_h264_mb_sizes
[
4
];
/**
* Uninit H264 param sets structure.
*/
void
ff_h264_ps_uninit
(
H264ParamSets
*
ps
);
/**
* Decode SPS
*/
...
...
libavcodec/h264_parser.c
View file @
0ea58059
...
...
@@ -649,17 +649,11 @@ static void h264_close(AVCodecParserContext *s)
{
H264ParseContext
*
p
=
s
->
priv_data
;
ParseContext
*
pc
=
&
p
->
pc
;
int
i
;
av_freep
(
&
pc
->
buffer
);
ff_h264_sei_uninit
(
&
p
->
sei
);
for
(
i
=
0
;
i
<
FF_ARRAY_ELEMS
(
p
->
ps
.
sps_list
);
i
++
)
av_buffer_unref
(
&
p
->
ps
.
sps_list
[
i
]);
for
(
i
=
0
;
i
<
FF_ARRAY_ELEMS
(
p
->
ps
.
pps_list
);
i
++
)
av_buffer_unref
(
&
p
->
ps
.
pps_list
[
i
]);
ff_h264_ps_uninit
(
&
p
->
ps
);
}
static
av_cold
int
init
(
AVCodecParserContext
*
s
)
...
...
libavcodec/h264_ps.c
View file @
0ea58059
...
...
@@ -298,6 +298,23 @@ static void decode_scaling_matrices(GetBitContext *gb, SPS *sps,
}
}
void
ff_h264_ps_uninit
(
H264ParamSets
*
ps
)
{
int
i
;
for
(
i
=
0
;
i
<
MAX_SPS_COUNT
;
i
++
)
av_buffer_unref
(
&
ps
->
sps_list
[
i
]);
for
(
i
=
0
;
i
<
MAX_PPS_COUNT
;
i
++
)
av_buffer_unref
(
&
ps
->
pps_list
[
i
]);
av_buffer_unref
(
&
ps
->
sps_ref
);
av_buffer_unref
(
&
ps
->
pps_ref
);
ps
->
pps
=
NULL
;
ps
->
sps
=
NULL
;
}
int
ff_h264_decode_seq_parameter_set
(
GetBitContext
*
gb
,
AVCodecContext
*
avctx
,
H264ParamSets
*
ps
,
int
ignore_truncation
)
{
...
...
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