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
2475fdbd
Commit
2475fdbd
authored
Mar 04, 2014
by
Lukasz Marek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavd/avdevice: always free detected devices on error
Signed-off-by:
Lukasz Marek
<
lukasz.m.luki@gmail.com
>
parent
1aa262f4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
avdevice.c
libavdevice/avdevice.c
+7
-2
No files found.
libavdevice/avdevice.c
View file @
2475fdbd
...
...
@@ -101,6 +101,7 @@ int avdevice_dev_to_app_control_message(struct AVFormatContext *s, enum AVDevToA
int
avdevice_list_devices
(
AVFormatContext
*
s
,
AVDeviceInfoList
**
device_list
)
{
int
ret
;
av_assert0
(
s
);
av_assert0
(
device_list
);
av_assert0
(
s
->
oformat
||
s
->
iformat
);
...
...
@@ -113,8 +114,12 @@ int avdevice_list_devices(AVFormatContext *s, AVDeviceInfoList **device_list)
if
(
!
(
*
device_list
))
return
AVERROR
(
ENOMEM
);
if
(
s
->
oformat
)
return
s
->
oformat
->
get_device_list
(
s
,
*
device_list
);
return
s
->
iformat
->
get_device_list
(
s
,
*
device_list
);
ret
=
s
->
oformat
->
get_device_list
(
s
,
*
device_list
);
else
ret
=
s
->
iformat
->
get_device_list
(
s
,
*
device_list
);
if
(
ret
<
0
)
avdevice_free_list_devices
(
device_list
);
return
ret
;
}
void
avdevice_free_list_devices
(
AVDeviceInfoList
**
device_list
)
...
...
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