Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
8ae80637
Commit
8ae80637
authored
Feb 16, 2024
by
Rémi Bernon
Committed by
Alexandre Julliard
Mar 21, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Release sink caps in the error path.
parent
a4ef56e1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
9 deletions
+6
-9
wg_transform.c
dlls/winegstreamer/wg_transform.c
+6
-9
No files found.
dlls/winegstreamer/wg_transform.c
View file @
8ae80637
...
...
@@ -338,7 +338,7 @@ NTSTATUS wg_transform_create(void *args)
struct
wg_format
output_format
=
*
params
->
output_format
;
struct
wg_format
input_format
=
*
params
->
input_format
;
GstElement
*
first
=
NULL
,
*
last
=
NULL
,
*
element
;
GstCaps
*
raw
_caps
=
NULL
,
*
src_caps
=
NULL
;
GstCaps
*
sink
_caps
=
NULL
,
*
src_caps
=
NULL
;
NTSTATUS
status
=
STATUS_UNSUCCESSFUL
;
GstPadTemplate
*
template
=
NULL
;
struct
wg_transform
*
transform
;
...
...
@@ -395,7 +395,7 @@ NTSTATUS wg_transform_create(void *args)
* raw output media type should be enough.
*/
media_type
=
gst_structure_get_name
(
gst_caps_get_structure
(
transform
->
output_caps
,
0
));
if
(
!
(
raw
_caps
=
gst_caps_new_empty_simple
(
media_type
)))
if
(
!
(
sink
_caps
=
gst_caps_new_empty_simple
(
media_type
)))
goto
out
;
switch
(
input_format
.
major_type
)
...
...
@@ -408,12 +408,9 @@ NTSTATUS wg_transform_create(void *args)
case
WG_MAJOR_TYPE_VIDEO_INDEO
:
case
WG_MAJOR_TYPE_VIDEO_WMV
:
case
WG_MAJOR_TYPE_VIDEO_MPEG1
:
if
(
!
(
element
=
find_element
(
GST_ELEMENT_FACTORY_TYPE_DECODER
,
src_caps
,
raw
_caps
))
if
(
!
(
element
=
find_element
(
GST_ELEMENT_FACTORY_TYPE_DECODER
,
src_caps
,
sink
_caps
))
||
!
append_element
(
transform
->
container
,
element
,
&
first
,
&
last
))
{
gst_caps_unref
(
raw_caps
);
goto
out
;
}
break
;
case
WG_MAJOR_TYPE_AUDIO
:
...
...
@@ -421,12 +418,9 @@ NTSTATUS wg_transform_create(void *args)
break
;
case
WG_MAJOR_TYPE_UNKNOWN
:
GST_FIXME
(
"Format %u not implemented!"
,
input_format
.
major_type
);
gst_caps_unref
(
raw_caps
);
goto
out
;
}
gst_caps_unref
(
raw_caps
);
switch
(
output_format
.
major_type
)
{
case
WG_MAJOR_TYPE_AUDIO
:
...
...
@@ -507,6 +501,7 @@ NTSTATUS wg_transform_create(void *args)
goto
out
;
gst_caps_unref
(
src_caps
);
gst_caps_unref
(
sink_caps
);
GST_INFO
(
"Created winegstreamer transform %p."
,
transform
);
params
->
transform
=
(
wg_transform_t
)(
ULONG_PTR
)
transform
;
...
...
@@ -521,6 +516,8 @@ out:
gst_object_unref
(
transform
->
my_src
);
if
(
src_caps
)
gst_caps_unref
(
src_caps
);
if
(
sink_caps
)
gst_caps_unref
(
sink_caps
);
if
(
transform
->
allocator
)
wg_allocator_destroy
(
transform
->
allocator
);
if
(
transform
->
drain_query
)
...
...
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