Skip to content

codecs: {h264,h265,mpeg2}decoder: Use GstFlowReturn everywhere

boolean return value is not sufficient for representing the reason of error in most cases. For instance, any errors around new_sequence() would mean negotiation error, not just ERROR. And some subclasses will allocate buffer/memory/surface on new_picture() but it could be failed because of expected error, likely flushing

Closes: #1578 (closed)

cc: @ndufresne @vjaquez @He_Junyan

Overall decision I made here:

  • Change log level for non-OK cases from ERROR to WARNING if the flow-return value is returned by subclasses (which might not be an ERROR actually)
  • Try to drain/empty DPB even if there was non-OK in the middle of processing

Tested using with VA (h264/h265), D3D11 (h264/h265) and NVDEC (h264/h265) via fluster, and using a few progressive/interlaced mpeg2 samples with VA/D3D11

Merge request reports

Loading