mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-12 10:25:33 +00:00
v4l2videodec: treat MPEG 1 format as MPEG 2
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4787>
This commit is contained in:
parent
f813a2813e
commit
81a2f2d779
1 changed files with 14 additions and 6 deletions
|
@ -1384,12 +1384,20 @@ G_STMT_START { \
|
||||||
gint mpegversion = 0;
|
gint mpegversion = 0;
|
||||||
gst_structure_get_int (s, "mpegversion", &mpegversion);
|
gst_structure_get_int (s, "mpegversion", &mpegversion);
|
||||||
|
|
||||||
if (mpegversion == 2) {
|
switch (mpegversion) {
|
||||||
SET_META ("MPEG2");
|
/* MPEG 2 decoders supports MPEG 1 format */
|
||||||
cdata->codec = gst_v4l2_mpeg2_get_codec ();
|
case 1:
|
||||||
} else {
|
case 2:
|
||||||
SET_META ("MPEG4");
|
SET_META ("MPEG2");
|
||||||
cdata->codec = gst_v4l2_mpeg4_get_codec ();
|
cdata->codec = gst_v4l2_mpeg2_get_codec ();
|
||||||
|
break;
|
||||||
|
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