mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
dvbsrc: reflow switch case statement a bit
Make it clear there's no 'break' missing at the end of the case SYS_DVBT, and pacify coverity (CID 1249689).
This commit is contained in:
parent
09f0b03762
commit
6505e84f7c
1 changed files with 24 additions and 22 deletions
|
@ -2395,29 +2395,31 @@ gst_dvbsrc_set_fe_params (GstDvbSrc * object, struct dtv_properties *props)
|
|||
}
|
||||
break;
|
||||
case SYS_DVBT:
|
||||
if (object->transmission_mode != TRANSMISSION_MODE_AUTO &&
|
||||
object->transmission_mode != TRANSMISSION_MODE_2K &&
|
||||
object->transmission_mode != TRANSMISSION_MODE_8K) {
|
||||
GST_WARNING_OBJECT (object, "Wrong DVB-T parameter combination: "
|
||||
"transmission mode should be either AUTO, 2K or 8K");
|
||||
}
|
||||
if (object->bandwidth != 6000000 && object->bandwidth != 7000000 &&
|
||||
object->bandwidth != 8000000) {
|
||||
GST_WARNING_OBJECT (object, "Wrong DVB-T parameter value: bandwidth "
|
||||
"is %d but only 6, 7 and 8 MHz are allowed", object->bandwidth);
|
||||
}
|
||||
case SYS_DVBT2:
|
||||
if (object->delsys != SYS_DVBT &&
|
||||
object->transmission_mode != TRANSMISSION_MODE_AUTO &&
|
||||
object->transmission_mode != TRANSMISSION_MODE_1K &&
|
||||
object->transmission_mode != TRANSMISSION_MODE_2K &&
|
||||
object->transmission_mode != TRANSMISSION_MODE_4K &&
|
||||
object->transmission_mode != TRANSMISSION_MODE_8K &&
|
||||
object->transmission_mode != TRANSMISSION_MODE_16K &&
|
||||
object->transmission_mode != TRANSMISSION_MODE_32K) {
|
||||
GST_WARNING_OBJECT (object, "Wrong DVB-T2 parameter combination: "
|
||||
"transmission mode should be either AUTO, 1K, 2K, 4K, 8K, 16K "
|
||||
"or 32K");
|
||||
if (object->delsys == SYS_DVBT) {
|
||||
if (object->transmission_mode != TRANSMISSION_MODE_AUTO &&
|
||||
object->transmission_mode != TRANSMISSION_MODE_2K &&
|
||||
object->transmission_mode != TRANSMISSION_MODE_8K) {
|
||||
GST_WARNING_OBJECT (object, "Wrong DVB-T parameter combination: "
|
||||
"transmission mode should be either AUTO, 2K or 8K");
|
||||
}
|
||||
if (object->bandwidth != 6000000 && object->bandwidth != 7000000 &&
|
||||
object->bandwidth != 8000000) {
|
||||
GST_WARNING_OBJECT (object, "Wrong DVB-T parameter value: bandwidth "
|
||||
"is %d but only 6, 7 and 8 MHz are allowed", object->bandwidth);
|
||||
}
|
||||
} else if (object->delsys == SYS_DVBT2) {
|
||||
if (object->transmission_mode != TRANSMISSION_MODE_AUTO &&
|
||||
object->transmission_mode != TRANSMISSION_MODE_1K &&
|
||||
object->transmission_mode != TRANSMISSION_MODE_2K &&
|
||||
object->transmission_mode != TRANSMISSION_MODE_4K &&
|
||||
object->transmission_mode != TRANSMISSION_MODE_8K &&
|
||||
object->transmission_mode != TRANSMISSION_MODE_16K &&
|
||||
object->transmission_mode != TRANSMISSION_MODE_32K) {
|
||||
GST_WARNING_OBJECT (object, "Wrong DVB-T2 parameter combination: "
|
||||
"transmission mode should be either AUTO, 1K, 2K, 4K, 8K, 16K "
|
||||
"or 32K");
|
||||
}
|
||||
}
|
||||
set_prop (props->props, &n, DTV_BANDWIDTH_HZ, object->bandwidth);
|
||||
set_prop (props->props, &n, DTV_CODE_RATE_HP, object->code_rate_hp);
|
||||
|
|
Loading…
Reference in a new issue