From 4878ce90a229d2b337cb2cb8750fed3c95f82104 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 13 Dec 2007 10:16:48 +0000 Subject: [PATCH] gst/videoparse/gstvideoparse.c: Add YV12 to the pad templates as it is supported too and allow Original commit message from CVS: * gst/videoparse/gstvideoparse.c: (gst_video_parse_sink_event): Add YV12 to the pad templates as it is supported too and allow -1 as stop position for NEWSEGMENT events. --- ChangeLog | 6 ++++++ common | 2 +- gst/videoparse/gstvideoparse.c | 8 +++++--- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 96d3049..958d568 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2007-12-13 Sebastian Dröge + * gst/videoparse/gstvideoparse.c: (gst_video_parse_sink_event): + Add YV12 to the pad templates as it is supported too and allow + -1 as stop position for NEWSEGMENT events. + +2007-12-13 Sebastian Dröge + * gst/videoparse/Makefile.am: Add $(GST_PLUGINS_BASE_CFLAGS) to CFLAGS to fix the build. diff --git a/common b/common index 4f261af..fb7ab03 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit 4f261af78b1128862cb847afb1b7254b8f458834 +Subproject commit fb7ab03319930496e922173d54f6dfccfff6f357 diff --git a/gst/videoparse/gstvideoparse.c b/gst/videoparse/gstvideoparse.c index 8c663cb..c18cb2e 100644 --- a/gst/videoparse/gstvideoparse.c +++ b/gst/videoparse/gstvideoparse.c @@ -112,13 +112,13 @@ static GstStaticPadTemplate gst_video_parse_src_pad_template = GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS, - GST_STATIC_CAPS (GST_VIDEO_CAPS_YUV ("{ I420, YUY2, UYVY }"))); + GST_STATIC_CAPS (GST_VIDEO_CAPS_YUV ("{ I420, YV12, YUY2, UYVY }"))); static GstStaticPadTemplate gst_video_parse_sink_pad_template = GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, - GST_STATIC_CAPS (GST_VIDEO_CAPS_YUV ("{ I420, YUY2, UYVY }"))); + GST_STATIC_CAPS (GST_VIDEO_CAPS_YUV ("{ I420, YV12, YUY2, UYVY }"))); GST_DEBUG_CATEGORY_STATIC (gst_video_parse_debug); #define GST_CAT_DEFAULT gst_video_parse_debug @@ -511,8 +511,10 @@ gst_video_parse_sink_event (GstPad * pad, GstEvent * event) ret = gst_video_parse_convert (vp, format, start, GST_FORMAT_TIME, &start); - ret &= gst_video_parse_convert (vp, format, stop, GST_FORMAT_TIME, &stop); ret &= gst_video_parse_convert (vp, format, time, GST_FORMAT_TIME, &time); + if (stop != GST_CLOCK_TIME_NONE) + ret &= + gst_video_parse_convert (vp, format, stop, GST_FORMAT_TIME, &stop); if (!ret) { GST_ERROR_OBJECT (vp, "Failed converting to GST_FORMAT_TIME format (%d)", format); -- 2.7.4