[2.0] support negative DTS
@Knopp
Submitted by Matej Link to original bug (#679466)
Description
[I'm not hoping for this to get fixed for 1.0; filing the bug to raise awareness anyway]
x264 generates one or two frames with negative DTS (one with b-frames enabled, two with b-pyramid).
This is necessary for sequence such as
IPBPP (PTS=0,2,1,3,4 DTS=-1,0,1,2,3)
to be decoded properly - B frame in the middle has PTS 1, but needs two frames (I, B) decoded before it can be displayed.
In GStreamer there is currently no way to represent a negative DTS. There are few hacks around this (encoder could compress the DTS - i.e. 0, 0.5, 1, 2, 3) or the DTS can be shifted in the encoder and shifted back in muxer, but these are either ugly or not entirely legal (compression).
If anyone has a nicer/or simpler solution I'm all ears.
Version: 2.x