GNOME Bugzilla – Bug 772468
basesink: Don't nest prepare/render calls
Last modified: 2016-11-03 19:28:59 UTC
During preroll, the prepare/render is no longer called in pair. It's confusing, in fact, the prepare/preroll pair from the nested into the prepare/render. As we often use the same function for both prepare and preroll, it's quite annoying bug.
Created attachment 337004 [details] [review] basesink: Don't nest prepare/render calls When the first buffer arrives, we endup calling: ->prepare() ->prepare() ->preroll() ->render() This will likely confuse any element using this method. With this patch, we ensure the preroll take place before the first render prepare() is called. This will result in: ->prepare() ->preroll() ->prepare() ->render()
Review of attachment 337004 [details] [review]: One question. ::: libs/gst/base/gstbasesink.c @@ +3419,2 @@ if (G_UNLIKELY (late)) goto dropped; Don't we always want to preroll without dropping? i.e. move the new code above this if?
(In reply to Matthew Waters (ystreet00) from comment #2) > Review of attachment 337004 [details] [review] [review]: > > One question. > > ::: libs/gst/base/gstbasesink.c > @@ +3419,2 @@ > if (G_UNLIKELY (late)) > goto dropped; > > Don't we always want to preroll without dropping? > > i.e. move the new code above this if? Yes, looks right. It looks like this minor bug existed before this patch.
Just include it in here, maybe as another independent commit :)
Created attachment 339064 [details] [review] basesink: Make sure we never drop the preroll buffer This is cosmetic as 'late' should never be set during preroll (in pause). Though code may evolve in the future, so this is good for preventing potential bugs.
Attachment 337004 [details] pushed as 5ca63b7 - basesink: Don't nest prepare/render calls Attachment 339064 [details] pushed as 7c8087f - basesink: Make sure we never drop the preroll buffer