mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-01 22:21:13 +00:00
v4l2videodec: correctly register v4l2mpeg2dec
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4977>
This commit is contained in:
parent
7b31c89f25
commit
8230c927f0
1 changed files with 7 additions and 14 deletions
|
@ -1384,20 +1384,13 @@ G_STMT_START { \
|
||||||
gint mpegversion = 0;
|
gint mpegversion = 0;
|
||||||
gst_structure_get_int (s, "mpegversion", &mpegversion);
|
gst_structure_get_int (s, "mpegversion", &mpegversion);
|
||||||
|
|
||||||
switch (mpegversion) {
|
if (mpegversion == 4) {
|
||||||
/* MPEG 2 decoders supports MPEG 1 format */
|
SET_META ("MPEG4");
|
||||||
case 1:
|
cdata->codec = gst_v4l2_mpeg4_get_codec ();
|
||||||
case 2:
|
} else {
|
||||||
SET_META ("MPEG2");
|
/* MPEG 2 decoders supports MPEG 1 format */
|
||||||
cdata->codec = gst_v4l2_mpeg2_get_codec ();
|
SET_META ("MPEG2");
|
||||||
break;
|
cdata->codec = gst_v4l2_mpeg2_get_codec ();
|
||||||
case 4:
|
|
||||||
SET_META ("MPEG4");
|
|
||||||
cdata->codec = gst_v4l2_mpeg4_get_codec ();
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
g_warning ("Unsupported MPEG Video version %i", mpegversion);
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
} else if (gst_structure_has_name (s, "video/x-h263")) {
|
} else if (gst_structure_has_name (s, "video/x-h263")) {
|
||||||
SET_META ("H263");
|
SET_META ("H263");
|
||||||
|
|
Loading…
Reference in a new issue