Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
gst-libav
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
60
Issues
60
List
Boards
Labels
Service Desk
Milestones
Merge Requests
10
Merge Requests
10
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
GStreamer
gst-libav
Commits
019a6020
Commit
019a6020
authored
Nov 02, 2009
by
Edward Hervey
🤘
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffdec: Don't use an allocated 1-entry structure for private data.
If there's only one entry, just use that entry.
parent
bd1b315c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
22 deletions
+7
-22
ext/ffmpeg/gstffmpegdec.c
ext/ffmpeg/gstffmpegdec.c
+7
-22
No files found.
ext/ffmpeg/gstffmpegdec.c
View file @
019a6020
...
...
@@ -169,13 +169,6 @@ struct _GstFFMpegDecClass
GstPadTemplate
*
srctempl
,
*
sinktempl
;
};
typedef
struct
_GstFFMpegDecClassParams
GstFFMpegDecClassParams
;
struct
_GstFFMpegDecClassParams
{
AVCodec
*
in_plugin
;
};
#define GST_TYPE_FFMPEGDEC \
(gst_ffmpegdec_get_type())
#define GST_FFMPEGDEC(obj) \
...
...
@@ -296,26 +289,22 @@ static void
gst_ffmpegdec_base_init
(
GstFFMpegDecClass
*
klass
)
{
GstElementClass
*
element_class
=
GST_ELEMENT_CLASS
(
klass
);
GstFFMpegDecClassParams
*
params
;
GstElementDetails
details
;
GstPadTemplate
*
sinktempl
,
*
srctempl
;
GstCaps
*
sinkcaps
,
*
srccaps
;
AVCodec
*
in_plugin
;
params
=
(
GstFFMpegDecClassParams
*
)
g_type_get_qdata
(
G_OBJECT_CLASS_TYPE
(
klass
),
in_plugin
=
(
AVCodec
*
)
g_type_get_qdata
(
G_OBJECT_CLASS_TYPE
(
klass
),
GST_FFDEC_PARAMS_QDATA
);
g_assert
(
params
!=
NULL
);
in_plugin
=
params
->
in_plugin
;
g_assert
(
in_plugin
!=
NULL
);
/* construct the element details struct */
details
.
longname
=
g_strdup_printf
(
"FFmpeg %s decoder"
,
params
->
in_plugin
->
long_name
);
in_plugin
->
long_name
);
details
.
klass
=
g_strdup_printf
(
"Codec/Decoder/%s"
,
(
params
->
in_plugin
->
type
==
CODEC_TYPE_VIDEO
)
?
"Video"
:
"Audio"
);
details
.
description
=
g_strdup_printf
(
"FFmpeg %s decoder"
,
params
->
in_plugin
->
name
);
(
in_plugin
->
type
==
CODEC_TYPE_VIDEO
)
?
"Video"
:
"Audio"
);
details
.
description
=
g_strdup_printf
(
"FFmpeg %s decoder"
,
in_plugin
->
name
);
details
.
author
=
"Wim Taymans <wim.taymans@gmail.com>, "
"Ronald Bultje <rbultje@ronald.bitfreak.net>, "
"Edward Hervey <bilboed@bilboed.com>"
;
...
...
@@ -2779,7 +2768,6 @@ gst_ffmpegdec_register (GstPlugin * plugin)
GST_LOG
(
"Registering decoders"
);
while
(
in_plugin
)
{
GstFFMpegDecClassParams
*
params
;
gchar
*
type_name
;
gchar
*
plugin_name
;
...
...
@@ -2849,12 +2837,9 @@ gst_ffmpegdec_register (GstPlugin * plugin)
type
=
g_type_from_name
(
type_name
);
if
(
!
type
)
{
params
=
g_new0
(
GstFFMpegDecClassParams
,
1
);
params
->
in_plugin
=
in_plugin
;
/* create the gtype now */
type
=
g_type_register_static
(
GST_TYPE_ELEMENT
,
type_name
,
&
typeinfo
,
0
);
g_type_set_qdata
(
type
,
GST_FFDEC_PARAMS_QDATA
,
(
gpointer
)
params
);
g_type_set_qdata
(
type
,
GST_FFDEC_PARAMS_QDATA
,
(
gpointer
)
in_plugin
);
}
/* (Ronald) MPEG-4 gets a higher priority because it has been well-
...
...
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