mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-06 23:48:53 +00:00
v4l2object: Fail cleanly if pixel format is unkown or not raw video
Certain decoder has been found to not choose a format automatically. Running v4l2videodec on these would assert. This patch will make it fail cleanly instead.
This commit is contained in:
parent
7e379e8fff
commit
b5dde037b4
1 changed files with 0 additions and 7 deletions
|
@ -1143,7 +1143,6 @@ gst_v4l2_object_v4l2fourcc_to_video_format (guint32 fourcc)
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
format = GST_VIDEO_FORMAT_UNKNOWN;
|
format = GST_VIDEO_FORMAT_UNKNOWN;
|
||||||
g_assert_not_reached ();
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2698,12 +2697,6 @@ gst_v4l2_object_setup_format (GstV4l2Object * v4l2object,
|
||||||
/* No need to care about mplane, the four first params are the same */
|
/* No need to care about mplane, the four first params are the same */
|
||||||
format = gst_v4l2_object_v4l2fourcc_to_video_format (fmt.fmt.pix.pixelformat);
|
format = gst_v4l2_object_v4l2fourcc_to_video_format (fmt.fmt.pix.pixelformat);
|
||||||
|
|
||||||
/* FIXME do more work in the whole function if
|
|
||||||
* format is GST_VIDEO_FORMAT_ENCODED
|
|
||||||
* Also gst_v4l2_object_v4l2fourcc_to_video_format should be improved
|
|
||||||
* because for now it never returns GST_VIDEO_FORMAT_ENCODED
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* fails if we do no translate the fmt.pix.pixelformat to GstVideoFormat */
|
/* fails if we do no translate the fmt.pix.pixelformat to GstVideoFormat */
|
||||||
if (format == GST_VIDEO_FORMAT_UNKNOWN)
|
if (format == GST_VIDEO_FORMAT_UNKNOWN)
|
||||||
goto unsupported_format;
|
goto unsupported_format;
|
||||||
|
|
Loading…
Reference in a new issue