mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
gst/videotestsrc/gstvideotestsrc.c: Handle 0/1 framerate correctly Fixes #331901.
Original commit message from CVS: * gst/videotestsrc/gstvideotestsrc.c: (gst_video_test_src_create): Handle 0/1 framerate correctly Fixes #331901.
This commit is contained in:
parent
b01a267aa1
commit
a443f9a7d6
2 changed files with 14 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
2006-04-28 Wim Taymans <wim@fluendo.com>
|
||||
|
||||
* gst/videotestsrc/gstvideotestsrc.c: (gst_video_test_src_create):
|
||||
Handle 0/1 framerate correctly Fixes #331901.
|
||||
|
||||
2006-04-28 Wim Taymans <wim@fluendo.com>
|
||||
|
||||
* tests/check/elements/audioconvert.c: (get_float_caps),
|
||||
|
|
|
@ -504,6 +504,10 @@ gst_video_test_src_create (GstPushSrc * psrc, GstBuffer ** buffer)
|
|||
if (src->fourcc == NULL)
|
||||
goto not_negotiated;
|
||||
|
||||
/* 0 framerate and we are at the second frame, eos */
|
||||
if (src->rate_numerator == 0 && src->n_frames == 1)
|
||||
goto eos;
|
||||
|
||||
newsize = gst_video_test_src_get_size (src, src->width, src->height);
|
||||
|
||||
g_return_val_if_fail (newsize > 0, GST_FLOW_ERROR);
|
||||
|
@ -552,6 +556,11 @@ not_negotiated:
|
|||
("format wasn't negotiated before get function"));
|
||||
return GST_FLOW_NOT_NEGOTIATED;
|
||||
}
|
||||
eos:
|
||||
{
|
||||
GST_DEBUG_OBJECT (src, "eos: 0 framerate and frame %d", src->n_frames);
|
||||
return GST_FLOW_UNEXPECTED;
|
||||
}
|
||||
no_buffer:
|
||||
{
|
||||
GST_DEBUG_OBJECT (src, "could not allocate buffer, reason %s",
|
||||
|
|
Loading…
Reference in a new issue