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
8688e6ac
Commit
8688e6ac
authored
Feb 18, 2012
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffprobe: fix crash if the file can't be opened.
parent
f23a7403
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
+4
-6
ffprobe.c
ffprobe.c
+4
-6
No files found.
ffprobe.c
View file @
8688e6ac
...
...
@@ -1627,9 +1627,9 @@ static int probe_file(WriterContext *wctx, const char *filename)
do_read_packets
=
do_show_packets
||
do_count_packets
;
ret
=
open_input_file
(
&
fmt_ctx
,
filename
);
nb_streams_frames
=
av_calloc
(
fmt_ctx
->
nb_streams
,
sizeof
(
*
nb_streams_frames
));
nb_streams_packets
=
av_calloc
(
fmt_ctx
->
nb_streams
,
sizeof
(
*
nb_streams_packets
));
if
(
ret
>=
0
)
{
nb_streams_frames
=
av_calloc
(
fmt_ctx
->
nb_streams
,
sizeof
(
*
nb_streams_frames
));
nb_streams_packets
=
av_calloc
(
fmt_ctx
->
nb_streams
,
sizeof
(
*
nb_streams_packets
));
if
(
do_read_frames
||
do_read_packets
)
{
const
char
*
chapter
;
if
(
do_show_frames
&&
do_show_packets
&&
...
...
@@ -1651,11 +1651,9 @@ static int probe_file(WriterContext *wctx, const char *filename)
if
(
fmt_ctx
->
streams
[
i
]
->
codec
->
codec_id
!=
CODEC_ID_NONE
)
avcodec_close
(
fmt_ctx
->
streams
[
i
]
->
codec
);
avformat_close_input
(
&
fmt_ctx
);
av_freep
(
&
nb_streams_frames
);
av_freep
(
&
nb_streams_packets
);
}
av_freep
(
&
nb_streams_frames
);
av_freep
(
&
nb_streams_packets
);
return
ret
;
}
...
...
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