GNOME Bugzilla – Bug 667716
decklinksrc: doesn't push new segment event on all pads
Last modified: 2012-03-17 21:29:48 UTC
Created attachment 205046 [details] [review] patch that pushes event on both pads Currently, decklinksrc only pushes new segment events on the videosrc pad. I think that it should push the event on both pads, so I've attached a little patch to do that.
I believe the extra event ref should be within the pad linked check to avoid leaks (and manually unreffed if both link checks return FALSE, for safety).
Created attachment 205561 [details] [review] updated patch Ah, you're right. I've made sure to unref the event if not linked. Thanks.
Failure to push the event on the first pad will still leak the event here, due to the return statement. This would be fixed if the extra event ref should be within the pad linked check. To be honest I'm not sure if an error pushing the event should or should not still push to the other pad...
Created attachment 207380 [details] [review] patch favoring video Sorry to let the conversation lapse. I should have noticed the potential for leakage, but I was attracted by the symmetry of the solution. I'm not really sure what should happen there either. I think the code expresses a preference for video over audio buffers, so perhaps we should be more concerned with the ability to push the event over the video src pad. With that in mind, I've a new patch.
commit 86eeca91de0cd5143ef23355cd8d4792d13e7b71 Author: blake tregre <blake@oblong.com> Date: Sat Feb 11 22:49:10 2012 -0800 decklinksrc: push new new segment event to all pads Take care to push the event to all pads, but favor the video src pad. Fixes: #667716.