GNOME Bugzilla – Bug 776979
vaapidecoder resets too much on input caps change
Last modified: 2017-02-21 18:07:33 UTC
bug 770921 made vaapidecoder do a full reset when set_format() is called, but causes a new problem by unconditionally resetting the decoder when not needed. I have a fragmented MP4 file, where the H.264 is continuous but the caps change periodically because the calculated framerate changes from fragment to fragment. That's a by-product of the fact that MP4 doesn't store framerate explicitly, so we have to guess it and the guess can be inaccurate. The test file can be found at https://www.dropbox.com/s/l34m9vhw8zlj69m/test-fragmented-videotestsrc.mp4?dl=0
Created attachment 343450 [details] [review] vaapidecode: update internal decoder sink caps When a new sink caps arrive the internal decoder state is updated and, if it is, request a downstream renegotiation. Previously, when new caps arrived the whole decoder where destroyed and recreated. Now, if the caps are compatible or has the same codec, the internal decoder is kept, but a downstream renegotiation is requested.
Attachment 343450 [details] pushed as 8654829 - vaapidecode: update internal decoder sink caps
*** Bug 774182 has been marked as a duplicate of this bug. ***
*** Bug 778792 has been marked as a duplicate of this bug. ***