Demuxer: Change workarounds in demuxer

Follow up of #5722