Skip to content
  • Haihao Xiang's avatar
    msdk: don't share context between msdkvpp and msdkenc · 98e49673
    Haihao Xiang authored and Víctor Manuel Jáquez Leal's avatar Víctor Manuel Jáquez Leal committed
    msdkenc supports CSC implicitly, so it is possible that two VPP
    processes are required when a pipeline contains msdkvpp and msdkenc.
    Before this fix, msdkvpp and msdkenc may share the same context, hence
    the same mfx session, which results in MFX_ERR_UNDEFINED_BEHAVIOR
    in MSDK because a mfx session has at most one VPP process only
    
    This fixes the broken pipelines below:
    
    gst-launch-1.0 videotestsrc ! video/x-raw,format=I420 ! msdkh264enc ! \
    msdkh264dec ! msdkvpp ! video/x-raw,format=YUY2 ! fakesink
    
    gst-launch-1.0 videotestsrc ! msdkvpp ! video/x-raw,format=YUY2 ! \
    msdkh264enc ! fakesink
    98e49673