GST_SEEK_FLAG_KEY_UNIT not giving the expected the result

Gregoire Gentil gregoire at gentil.com
Sun Feb 9 01:30:41 UTC 2020


Hello,

I receive an h264 stream that I put into a PS container with:

rtph264depay ! h264parse ! mpegpsmux

Then, I replay it with a standard decodebin pipeline. Either in playing 
or pauses mode, when I do:

gst_element_seek_simple(data->pipeline, GST_FORMAT_TIME, 
GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT | 
GST_SEEK_FLAG_SNAP_NEAREST, desired_position);

I'm still getting an intermediate frame. By intermediate, I mean that 
the frame is essentially black with some area filled with the real 
content. The 2 or 3 successive frames are "similar" and then I reach a 
frame with the whole window updated.

My understanding was that GST_SEEK_FLAG_KEY_UNIT ensures that I reach a 
"full content" frame. Am I doing something wrong or am I 
misunderstanding the documentation? How can I avoid this?

Grégoire


More information about the gstreamer-devel mailing list