diff --git a/ChangeLog b/ChangeLog index 29cfeda71a..aceee49ab0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-04-28 Wim Taymans + + * gst/videotestsrc/gstvideotestsrc.c: (gst_video_test_src_create): + Handle 0/1 framerate correctly Fixes #331901. + 2006-04-28 Wim Taymans * tests/check/elements/audioconvert.c: (get_float_caps), diff --git a/gst/videotestsrc/gstvideotestsrc.c b/gst/videotestsrc/gstvideotestsrc.c index 51812ca7f5..e5d5c95196 100644 --- a/gst/videotestsrc/gstvideotestsrc.c +++ b/gst/videotestsrc/gstvideotestsrc.c @@ -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",