mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-07 23:12:42 +00:00
avcfg: Simplify code
The existence of 'opt' is checked, the remainder of the code can therefore rely on it being valid. CID #1439537
This commit is contained in:
parent
5e4f6cadb0
commit
143aa80cdf
1 changed files with 77 additions and 82 deletions
|
@ -461,15 +461,12 @@ gst_ffmpeg_cfg_get_property (AVCodecContext * refcontext, GValue * value,
|
|||
GParamSpec * pspec)
|
||||
{
|
||||
const AVOption *opt;
|
||||
int res = -1;
|
||||
|
||||
opt = g_param_spec_get_qdata (pspec, avoption_quark);
|
||||
|
||||
if (!opt) {
|
||||
if (!opt)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (opt) {
|
||||
int res = -1;
|
||||
|
||||
switch (G_PARAM_SPEC_VALUE_TYPE (pspec)) {
|
||||
case G_TYPE_INT:
|
||||
|
@ -547,10 +544,8 @@ gst_ffmpeg_cfg_get_property (AVCodecContext * refcontext, GValue * value,
|
|||
g_type_name (G_PARAM_SPEC_VALUE_TYPE (pspec)));
|
||||
}
|
||||
}
|
||||
return res >= 0;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return res >= 0;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in a new issue