GNOME Bugzilla – Bug 421834
videorate breaks on dimension changes
Last modified: 2007-04-12 15:01:14 UTC
Use case: 3 buffers come in 1 after each other from mpeg2dec, 3rd one with different dimension from first 2. 720x576 mpeg2dec's sink pad is 720x576 720x576 mpeg2dec's sink pad is 720x576 510x234 mpeg2dec's sink pad is now 510x234 Videorate stores buffers, so after receiving 2nd buffer, it sends 1st buffer. After receiving 3rd buffer, it sends 2nd buffer. At time of sending 2nd buffer, setcaps has already set src pad caps to 510x234 because 3rd buffer has been received on sink pad. The flush_prev function sets src pad's caps on the buffer going out which means a buffer of 720x576 is sent with caps of 510x234. The 3 buffers ideally should go out with the same caps as they had when they came in except the framerate (which can be different depending on the downstream element). I am going to write a unit test that will check that this behaviour holds.
Created attachment 85175 [details] diff to add unit test This patch pushes 4 buffers to videorate and makes sure the 3 buffers output have the right caps.
Commited the unit test after slightly changing it to handle the behaviour as implemented by Mike. * tests/check/elements/videorate.c: (GST_START_TEST), (videorate_suite): Added check for videorate changing caps handling. Closes #421834.