mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-27 10:40:34 +00:00
ringbuffer: store bpf in the right variable
This commit is contained in:
parent
89f3572986
commit
2f8292b495
1 changed files with 7 additions and 7 deletions
|
@ -214,7 +214,7 @@ gst_ring_buffer_parse_caps (GstRingBufferSpec * spec, GstCaps * caps)
|
||||||
goto parse_error;
|
goto parse_error;
|
||||||
|
|
||||||
spec->type = GST_BUFTYPE_A_LAW;
|
spec->type = GST_BUFTYPE_A_LAW;
|
||||||
spec->info.bpf = info.channels;
|
info.bpf = info.channels;
|
||||||
} else if (g_str_equal (mimetype, "audio/x-mulaw")) {
|
} else if (g_str_equal (mimetype, "audio/x-mulaw")) {
|
||||||
/* extract the needed information from the cap */
|
/* extract the needed information from the cap */
|
||||||
if (!(gst_structure_get_int (structure, "rate", &info.rate) &&
|
if (!(gst_structure_get_int (structure, "rate", &info.rate) &&
|
||||||
|
@ -222,35 +222,35 @@ gst_ring_buffer_parse_caps (GstRingBufferSpec * spec, GstCaps * caps)
|
||||||
goto parse_error;
|
goto parse_error;
|
||||||
|
|
||||||
spec->type = GST_BUFTYPE_MU_LAW;
|
spec->type = GST_BUFTYPE_MU_LAW;
|
||||||
spec->info.bpf = info.channels;
|
info.bpf = info.channels;
|
||||||
} else if (g_str_equal (mimetype, "audio/x-iec958")) {
|
} else if (g_str_equal (mimetype, "audio/x-iec958")) {
|
||||||
/* extract the needed information from the cap */
|
/* extract the needed information from the cap */
|
||||||
if (!(gst_structure_get_int (structure, "rate", &info.rate)))
|
if (!(gst_structure_get_int (structure, "rate", &info.rate)))
|
||||||
goto parse_error;
|
goto parse_error;
|
||||||
|
|
||||||
spec->type = GST_BUFTYPE_IEC958;
|
spec->type = GST_BUFTYPE_IEC958;
|
||||||
spec->info.bpf = 4;
|
info.bpf = 4;
|
||||||
} else if (g_str_equal (mimetype, "audio/x-ac3")) {
|
} else if (g_str_equal (mimetype, "audio/x-ac3")) {
|
||||||
/* extract the needed information from the cap */
|
/* extract the needed information from the cap */
|
||||||
if (!(gst_structure_get_int (structure, "rate", &info.rate)))
|
if (!(gst_structure_get_int (structure, "rate", &info.rate)))
|
||||||
goto parse_error;
|
goto parse_error;
|
||||||
|
|
||||||
spec->type = GST_BUFTYPE_AC3;
|
spec->type = GST_BUFTYPE_AC3;
|
||||||
spec->info.bpf = 4;
|
info.bpf = 4;
|
||||||
} else if (g_str_equal (mimetype, "audio/x-eac3")) {
|
} else if (g_str_equal (mimetype, "audio/x-eac3")) {
|
||||||
/* extract the needed information from the cap */
|
/* extract the needed information from the cap */
|
||||||
if (!(gst_structure_get_int (structure, "rate", &info.rate)))
|
if (!(gst_structure_get_int (structure, "rate", &info.rate)))
|
||||||
goto parse_error;
|
goto parse_error;
|
||||||
|
|
||||||
spec->type = GST_BUFTYPE_EAC3;
|
spec->type = GST_BUFTYPE_EAC3;
|
||||||
spec->info.bpf = 16;
|
info.bpf = 16;
|
||||||
} else if (g_str_equal (mimetype, "audio/x-dts")) {
|
} else if (g_str_equal (mimetype, "audio/x-dts")) {
|
||||||
/* extract the needed information from the cap */
|
/* extract the needed information from the cap */
|
||||||
if (!(gst_structure_get_int (structure, "rate", &info.rate)))
|
if (!(gst_structure_get_int (structure, "rate", &info.rate)))
|
||||||
goto parse_error;
|
goto parse_error;
|
||||||
|
|
||||||
spec->type = GST_BUFTYPE_DTS;
|
spec->type = GST_BUFTYPE_DTS;
|
||||||
spec->info.bpf = 4;
|
info.bpf = 4;
|
||||||
} else if (g_str_equal (mimetype, "audio/mpeg") &&
|
} else if (g_str_equal (mimetype, "audio/mpeg") &&
|
||||||
gst_structure_get_int (structure, "mpegaudioversion", &i) &&
|
gst_structure_get_int (structure, "mpegaudioversion", &i) &&
|
||||||
(i == 1 || i == 2)) {
|
(i == 1 || i == 2)) {
|
||||||
|
@ -260,7 +260,7 @@ gst_ring_buffer_parse_caps (GstRingBufferSpec * spec, GstCaps * caps)
|
||||||
goto parse_error;
|
goto parse_error;
|
||||||
|
|
||||||
spec->type = GST_BUFTYPE_MPEG;
|
spec->type = GST_BUFTYPE_MPEG;
|
||||||
spec->info.bpf = 4;
|
info.bpf = 4;
|
||||||
} else {
|
} else {
|
||||||
goto parse_error;
|
goto parse_error;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue