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
f6912cc3
Commit
f6912cc3
authored
Oct 04, 2018
by
Mark Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
trace_headers: Fix memory leaks on syntax read failures
parent
b2adc316
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
10 deletions
+4
-10
trace_headers_bsf.c
libavcodec/trace_headers_bsf.c
+4
-10
No files found.
libavcodec/trace_headers_bsf.c
View file @
f6912cc3
...
@@ -49,15 +49,11 @@ static int trace_headers_init(AVBSFContext *bsf)
...
@@ -49,15 +49,11 @@ static int trace_headers_init(AVBSFContext *bsf)
av_log
(
bsf
,
AV_LOG_INFO
,
"Extradata
\n
"
);
av_log
(
bsf
,
AV_LOG_INFO
,
"Extradata
\n
"
);
err
=
ff_cbs_read_extradata
(
ctx
->
cbc
,
&
ps
,
bsf
->
par_in
);
err
=
ff_cbs_read_extradata
(
ctx
->
cbc
,
&
ps
,
bsf
->
par_in
);
if
(
err
<
0
)
{
av_log
(
bsf
,
AV_LOG_ERROR
,
"Failed to read extradata.
\n
"
);
return
err
;
}
ff_cbs_fragment_uninit
(
ctx
->
cbc
,
&
ps
);
ff_cbs_fragment_uninit
(
ctx
->
cbc
,
&
ps
);
}
}
return
0
;
return
err
;
}
}
static
void
trace_headers_close
(
AVBSFContext
*
bsf
)
static
void
trace_headers_close
(
AVBSFContext
*
bsf
)
...
@@ -97,14 +93,12 @@ static int trace_headers(AVBSFContext *bsf, AVPacket *pkt)
...
@@ -97,14 +93,12 @@ static int trace_headers(AVBSFContext *bsf, AVPacket *pkt)
av_log
(
bsf
,
AV_LOG_INFO
,
"Packet: %d bytes%s.
\n
"
,
pkt
->
size
,
tmp
);
av_log
(
bsf
,
AV_LOG_INFO
,
"Packet: %d bytes%s.
\n
"
,
pkt
->
size
,
tmp
);
err
=
ff_cbs_read_packet
(
ctx
->
cbc
,
&
au
,
pkt
);
err
=
ff_cbs_read_packet
(
ctx
->
cbc
,
&
au
,
pkt
);
if
(
err
<
0
)
{
av_packet_unref
(
pkt
);
return
err
;
}
ff_cbs_fragment_uninit
(
ctx
->
cbc
,
&
au
);
ff_cbs_fragment_uninit
(
ctx
->
cbc
,
&
au
);
return
0
;
if
(
err
<
0
)
av_packet_unref
(
pkt
);
return
err
;
}
}
const
AVBitStreamFilter
ff_trace_headers_bsf
=
{
const
AVBitStreamFilter
ff_trace_headers_bsf
=
{
...
...
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