From 0d66d05c98994214e0c862182d7b23ecbeef2ca8 Mon Sep 17 00:00:00 2001 From: Vincent Penquerc'h Date: Fri, 10 Jan 2014 14:24:12 +0000 Subject: [PATCH] videotestsrc: fix unit test breaking on duration query The new switch caused breaks to not break of the main switch anymore, causing fall through. --- gst/videotestsrc/gstvideotestsrc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gst/videotestsrc/gstvideotestsrc.c b/gst/videotestsrc/gstvideotestsrc.c index a804a3c..d82ce2d 100644 --- a/gst/videotestsrc/gstvideotestsrc.c +++ b/gst/videotestsrc/gstvideotestsrc.c @@ -792,12 +792,13 @@ gst_video_test_src_query (GstBaseSrc * bsrc, GstQuery * query) * GST_SECOND, src->info.fps_d, src->info.fps_n); res = TRUE; gst_query_set_duration (query, GST_FORMAT_TIME, dur); - break; + goto done; } case GST_FORMAT_BYTES: + res = TRUE; gst_query_set_duration (query, GST_FORMAT_BYTES, bsrc->num_buffers * src->info.size); - break; + goto done; default: break; } @@ -808,6 +809,7 @@ gst_video_test_src_query (GstBaseSrc * bsrc, GstQuery * query) res = GST_BASE_SRC_CLASS (parent_class)->query (bsrc, query); break; } +done: return res; } -- 2.7.4